From 934879e5cf6ba03d031e92cfd8263eb87c4bac06 Mon Sep 17 00:00:00 2001 From: DanielS Date: Wed, 24 Jun 2026 01:40:17 +0200 Subject: [PATCH] fix: redirect to home page on sign out --- shop/components/NavbarClient.tsx | 2 +- shop/components/logout-button.tsx | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) 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 ;