From 4bd2fae1fe729d9cf82bd9e4b39d39f806ce5758 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 8 Nov 2025 16:13:48 +0900 Subject: refactor(frontend): Simplify AuthContextType --- frontend/src/components/Navigation.tsx | 4 ++-- frontend/src/components/ProtectedRoute.tsx | 4 ++-- frontend/src/contexts/AuthContext.tsx | 17 ++++++++--------- 3 files changed, 12 insertions(+), 13 deletions(-) (limited to 'frontend/src') diff --git a/frontend/src/components/Navigation.tsx b/frontend/src/components/Navigation.tsx index 4d41d32..4be54a7 100644 --- a/frontend/src/components/Navigation.tsx +++ b/frontend/src/components/Navigation.tsx @@ -10,7 +10,7 @@ import { useAuth } from "../contexts/AuthContext"; import { MenuItem } from "./MenuItem"; export function Navigation() { - const { logout, user } = useAuth(); + const { logout, isLoggedIn } = useAuth(); const [, setLocation] = useLocation(); const handleLogout = async () => { @@ -29,7 +29,7 @@ export function Navigation() { - {user && ( + {isLoggedIn && (