浏览代码

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 (

正在加载...
取消
保存