feat: update

This commit is contained in:
landaiqing
2024-07-23 11:00:17 +08:00
parent 757f494f1f
commit 8fa1c50fb3
3 changed files with 21 additions and 20 deletions

View File

@@ -53,7 +53,7 @@ import MyFavorites from "@/router/modules/main/user/myFavorites";
const routes: RouteObject[] = [
{
path: "/",
Component: (props) => ComponentLoading(Home, props),
element: <Navigate to={"/home"} />,
},
{
path: "/register",

View File

@@ -14,7 +14,8 @@ export default function AuthRoute(props: { children: React.ReactNode }) {
currentPath === "/404" ||
(currentPath === "/register" && !isLogin) ||
(currentPath === "/forget" && !isLogin) ||
(currentPath === "/" && !isLogin);
(currentPath === "/" && !isLogin) ||
(currentPath === "/home" && !isLogin);
// 登录后访问login
const conditionWithLogin: boolean =
(currentPath === "/login" && isLogin) ||