Fix auth in AuthRoute
This commit is contained in:
@@ -13,7 +13,7 @@ const AuthRoute = () => {
|
|||||||
document.title = `${handle?.titlePrefix ?? ''}${
|
document.title = `${handle?.titlePrefix ?? ''}${
|
||||||
handle?.title ? handle?.title : PRODUCTION_NAME
|
handle?.title ? handle?.title : PRODUCTION_NAME
|
||||||
}${handle?.titlePostfix ?? ''}`
|
}${handle?.titlePostfix ?? ''}`
|
||||||
if (handle?.auth && !isLogin) {
|
if (matches.some(({ handle }) => (handle as RouteHandle)?.auth) && !isLogin) {
|
||||||
return (
|
return (
|
||||||
<Navigate
|
<Navigate
|
||||||
to={`/login${
|
to={`/login${
|
||||||
|
|||||||
Reference in New Issue
Block a user