check on link to log out if a session exists

This commit is contained in:
2022-10-28 10:49:41 +01:00
parent e54fd92e22
commit ffe2a24df0
+6 -4
View File
@@ -11,6 +11,8 @@ function Error({ statusCode }, props) {
let { t, lang } = useTranslation();
const { footerLinks, pages } = props;
const { data: session, status } = useSession();
return (
<div>
<Head>
@@ -38,12 +40,12 @@ function Error({ statusCode }, props) {
onClick={() => {
destroyCookie({}, "pinsUser"),
window.localStorage.clear(),
signOut({
callbackUrl: "/",
});
session != null &&
signOut({
callbackUrl: "/",
});
}}
>
{" "}
Go back home
</a>
</div>