瀏覽代碼

add settimeout on lader

master
azri 4 週之前
父節點
當前提交
503952aac4
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3
    1
      src/components/Loader/Loader.jsx

+ 3
- 1
src/components/Loader/Loader.jsx 查看文件

@@ -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…
取消
儲存