feat: optional provider

This commit is contained in:
DarkSky
2022-08-12 16:54:47 +08:00
parent 57b8263acd
commit edfa95057b
11 changed files with 267 additions and 85 deletions
+1 -1
View File
@@ -23,7 +23,7 @@ export function RoutePrivate({
return <PageLoading />;
}
if (!user) {
if (!user || !pathname.startsWith(`/${user.id}`)) {
return (
<Navigate
to={unauthorizedRedirectTo}