Skip to content

Commit

Permalink
update navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
melkent committed Nov 27, 2024
1 parent 3402d6f commit 3b9ba22
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion frontend/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ function App() {
const handleClickLogout = async () => {
try {
await logout();
navigate("/homepage");
navigate("/login");
} catch (e) {
console.log("Failed to logout: " + e.message);
}
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/utils/ProtectedRoutes.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ import { useAuth } from '../contexts/AuthContext';

export const ProtectedRoutes = () => {
const { session } = useAuth();
return session ? <Outlet /> : <Navigate to='/homepage' />;
return session ? <Outlet /> : <Navigate to='/login' />;
}

0 comments on commit 3b9ba22

Please sign in to comment.