feat: optional provider

This commit is contained in:
DarkSky committed 2022-08-12 16:57:14 +08:00
1 parent 57b8263acd
commit edfa95057b
11 files changed
+267 -85

No files matched your search

+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}