diff options
Diffstat (limited to 'frontend/src/components/ProtectedRoute.tsx')
| -rw-r--r-- | frontend/src/components/ProtectedRoute.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/frontend/src/components/ProtectedRoute.tsx b/frontend/src/components/ProtectedRoute.tsx index 0cfef42..206e5c5 100644 --- a/frontend/src/components/ProtectedRoute.tsx +++ b/frontend/src/components/ProtectedRoute.tsx @@ -7,7 +7,7 @@ interface Props { } export function ProtectedRoute({ children }: Props) { - const { user, isLoading } = useAuth(); + const { isLoggedIn, isLoading } = useAuth(); if (isLoading) { return ( @@ -24,7 +24,7 @@ export function ProtectedRoute({ children }: Props) { ); } - if (!user) { + if (!isLoggedIn) { return <Redirect to="/login" />; } |
