瀏覽代碼

auto redirect

master
azri 1 周之前
父節點
當前提交
4738c850a5
共有 1 個檔案被更改,包括 3 行新增1 行删除
  1. 3
    1
      src/pages/Products/index.jsx

+ 3
- 1
src/pages/Products/index.jsx 查看文件

@@ -20,7 +20,9 @@ const Products = () => {
20 20
         setCollection(selectCollection)
21 21
       }
22 22
 
23
-    } 
23
+    }else{
24
+      window.location.href = "/"
25
+    }
24 26
   }, [])
25 27
 
26 28
   return (

Loading…
取消
儲存