瀏覽代碼

🐛 fix(route): 修复移动端未认证用户重定向路径错误

- 将未认证用户重定向路径从/admin/login修正为/mobile/login,确保移动端路由正确匹配
yourname 5 月之前
父節點
當前提交
a5f0fd8a7d
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/client/mobile/components/ProtectedRoute.tsx

+ 1 - 1
src/client/mobile/components/ProtectedRoute.tsx

@@ -15,7 +15,7 @@ export const ProtectedRoute = ({ children }: { children: React.ReactNode }) => {
   useEffect(() => {
     // 只有在加载完成且未认证时才重定向
     if (!isLoading && !isAuthenticated) {
-      navigate('/admin/login', { replace: true });
+      navigate('/mobile/login', { replace: true });
     }
   }, [isAuthenticated, isLoading, navigate]);