🐛 Logout redirect not working

This commit is contained in:
Meier Lukas
2023-08-05 11:49:37 +02:00
parent 5039287d18
commit 050ed8f877

View File

@@ -28,8 +28,6 @@ export const AvatarMenu = () => {
const Icon = colorScheme === 'dark' ? IconSun : IconMoonStars; const Icon = colorScheme === 'dark' ? IconSun : IconMoonStars;
const signOutRedirectUrl = typeof window !== 'undefined' ? window.location.href : '/';
return ( return (
<> <>
<UnstyledButton> <UnstyledButton>
@@ -75,8 +73,8 @@ export const AvatarMenu = () => {
color="red" color="red"
onClick={() => onClick={() =>
signOut({ signOut({
callbackUrl: signOutRedirectUrl, redirect: false,
}) }).then(() => window.location.reload())
} }
> >
Logout from {sessionData.user.name} Logout from {sessionData.user.name}