diff --git a/src/components/layout/header/AvatarMenu.tsx b/src/components/layout/header/AvatarMenu.tsx index 65d491a26..d21b3edb6 100644 --- a/src/components/layout/header/AvatarMenu.tsx +++ b/src/components/layout/header/AvatarMenu.tsx @@ -28,6 +28,8 @@ export const AvatarMenu = () => { const Icon = colorScheme === 'dark' ? IconSun : IconMoonStars; + const signOutRedirectUrl = typeof window !== 'undefined' ? window.location.href : '/'; + return ( <> @@ -68,7 +70,15 @@ export const AvatarMenu = () => { About {sessionData?.user ? ( - } color="red" onClick={() => signOut()}> + } + color="red" + onClick={() => + signOut({ + callbackUrl: signOutRedirectUrl, + }) + } + > Logout from {sessionData.user.name} ) : (