From 92edad08d964fe86b4d1fe10b676463878e44147 Mon Sep 17 00:00:00 2001 From: Randa Firman Putra Date: Mon, 8 Dec 2025 01:35:19 +0700 Subject: [PATCH] debugging --- components/ui/Navbar.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/ui/Navbar.tsx b/components/ui/Navbar.tsx index 1ca97e0..f301853 100644 --- a/components/ui/Navbar.tsx +++ b/components/ui/Navbar.tsx @@ -61,9 +61,13 @@ const Navbar = () => { const checkUserSession = async () => { try { const response = await fetch('/api/auth/user'); + console.log('Session check response:', response.status); if (response.ok) { const data = await response.json(); + console.log('User data:', data); setUser(data.user); + } else { + console.log('No session found or session check failed'); } } catch (error) { console.error('Error checking session:', error);