16185 and 16630 language switching
This commit is contained in:
@@ -7,6 +7,8 @@ import CookieBanner from "../../components/cookieBanner";
|
||||
import Footer from "../../components/footer";
|
||||
import Header from "../../components/header";
|
||||
import ServiceBanner from "../../components/servicebanner";
|
||||
import { destroyCookie, setCookie } from "nookies";
|
||||
import { useEffect } from "react";
|
||||
|
||||
import { getCsrfToken } from "next-auth/react";
|
||||
|
||||
@@ -16,6 +18,14 @@ const Error = (props) => {
|
||||
|
||||
const { error } = useRouter().query;
|
||||
|
||||
useEffect(() => {
|
||||
window.localStorage.clear(),
|
||||
destroyCookie(null, "next-auth.csrf-token", { path: "/" }),
|
||||
destroyCookie(null, "next-auth.callback-url", { path: "/" }),
|
||||
destroyCookie(null, "pedw_locale", { path: "/" }),
|
||||
destroyCookie(null, "pinsUser", { path: "/" });
|
||||
}, []);
|
||||
|
||||
const errors = {
|
||||
Signin: t("auth:auth-error-Signin-label"),
|
||||
OAuthSignin: t("auth:auth-error-OAuthSignin-label"),
|
||||
|
||||
Reference in New Issue
Block a user