feat: update
This commit is contained in:
@@ -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",
|
||||
|
@@ -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) ||
|
||||
|
Reference in New Issue
Block a user