From 73be5d2f22c14d008be56cff9a733ad601c96519 Mon Sep 17 00:00:00 2001 From: muken Date: Tue, 30 Jun 2026 23:28:47 -0500 Subject: [PATCH] fix: navbar refreshes auth state on navigation Login button now correctly changes to Logout after login --- src/components/Navbar.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Navbar.tsx b/src/components/Navbar.tsx index 61d2717..9019c5c 100644 --- a/src/components/Navbar.tsx +++ b/src/components/Navbar.tsx @@ -52,7 +52,7 @@ export default function Navbar() { link.href = data.data; }) .catch(() => {}); - }, []); + }, [pathname]); const handleLogout = async () => { await fetch('/api/auth/logout', { method: 'POST', credentials: 'same-origin' });