Przeglądaj źródła

add settimeout on lader

master
azri 7 miesięcy temu
rodzic
commit
503952aac4
1 zmienionych plików z 3 dodań i 1 usunięć
  1. 3
    1
      src/components/Loader/Loader.jsx

+ 3
- 1
src/components/Loader/Loader.jsx Wyświetl plik

12
   useEffect(() => {
12
   useEffect(() => {
13
     
13
     
14
     if (products.length > 0) {
14
     if (products.length > 0) {
15
-      setDisplay(false)
15
+      setTimeout(() => {
16
+        setDisplay(false)
17
+      }, 1000);
16
     }
18
     }
17
 
19
 
18
   }, [products])
20
   }, [products])

Ładowanie…
Anuluj
Zapisz