diff --git a/shop/components/NavbarClient.tsx b/shop/components/NavbarClient.tsx index 1cef7ad..e008cf7 100644 --- a/shop/components/NavbarClient.tsx +++ b/shop/components/NavbarClient.tsx @@ -87,8 +87,8 @@ export function NavbarClient({ user, role = "partner" }: NavbarClientProps) { await supabase.auth.signOut(); setCurrentUser(null); setIsMobileMenuOpen(false); - router.refresh(); router.push("/"); + router.refresh(); }; return ( diff --git a/shop/components/logout-button.tsx b/shop/components/logout-button.tsx index 7654159..5c61e9d 100644 --- a/shop/components/logout-button.tsx +++ b/shop/components/logout-button.tsx @@ -9,7 +9,8 @@ export function LogoutButton() { const logout = async () => { await signOut(); - router.push("/auth/login"); + router.push("/"); + router.refresh(); }; return ;