From 050ed8f8777f7a6f8ab45e1f66a205ae1d0382ce Mon Sep 17 00:00:00 2001 From: Meier Lukas Date: Sat, 5 Aug 2023 11:49:37 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Logout=20redirect=20not=20workin?= =?UTF-8?q?g?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/layout/header/AvatarMenu.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/components/layout/header/AvatarMenu.tsx b/src/components/layout/header/AvatarMenu.tsx index d21b3edb6..d6e08db33 100644 --- a/src/components/layout/header/AvatarMenu.tsx +++ b/src/components/layout/header/AvatarMenu.tsx @@ -28,8 +28,6 @@ export const AvatarMenu = () => { const Icon = colorScheme === 'dark' ? IconSun : IconMoonStars; - const signOutRedirectUrl = typeof window !== 'undefined' ? window.location.href : '/'; - return ( <> @@ -75,8 +73,8 @@ export const AvatarMenu = () => { color="red" onClick={() => signOut({ - callbackUrl: signOutRedirectUrl, - }) + redirect: false, + }).then(() => window.location.reload()) } > Logout from {sessionData.user.name}