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' });