Fix auth in AuthRoute

This commit is contained in:
2023-10-12 01:10:09 +08:00
parent a228d27a51
commit 41b0cb6d3e

View File

@@ -13,7 +13,7 @@ const AuthRoute = () => {
document.title = `${handle?.titlePrefix ?? ''}${
handle?.title ? handle?.title : PRODUCTION_NAME
}${handle?.titlePostfix ?? ''}`
if (handle?.auth && !isLogin) {
if (matches.some(({ handle }) => (handle as RouteHandle)?.auth) && !isLogin) {
return (
<Navigate
to={`/login${