Explorar el Código

add settimeout on lader

master
azri hace 4 semanas
padre
commit
503952aac4
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3
    1
      src/components/Loader/Loader.jsx

+ 3
- 1
src/components/Loader/Loader.jsx Ver fichero

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

Loading…
Cancelar
Guardar