fix: bug修复
This commit is contained in:
@@ -12,13 +12,14 @@ export default function AuthRoute(props: { children: React.ReactNode }) {
|
||||
const condition: boolean =
|
||||
(currentPath === "/login" && !isLogin) ||
|
||||
currentPath === "/404" ||
|
||||
(currentPath === "register" && !isLogin) ||
|
||||
(currentPath === "forget" && !isLogin);
|
||||
(currentPath === "/register" && !isLogin) ||
|
||||
(currentPath === "/forget" && !isLogin) ||
|
||||
(currentPath === "/" && !isLogin);
|
||||
// 登录后访问login
|
||||
const conditionWithLogin: boolean =
|
||||
(currentPath === "/login" && isLogin) ||
|
||||
(currentPath === "register" && isLogin) ||
|
||||
(currentPath === "forget" && isLogin);
|
||||
(currentPath === "/register" && isLogin) ||
|
||||
(currentPath === "/forget" && isLogin);
|
||||
const findPath: any = matchAuth(currentPath);
|
||||
|
||||
if (condition) {
|
||||
|
Reference in New Issue
Block a user