16185 and 16630 language switching

This commit is contained in:
2025-06-13 12:58:38 +01:00
parent b4451dc7ee
commit 46876cdff6
8 changed files with 213 additions and 97 deletions
+10
View File
@@ -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"),