pass showlogin vars to pages and components

This commit is contained in:
2026-01-28 13:31:19 +00:00
parent b790facf56
commit 46bc5d1006
5 changed files with 148 additions and 148 deletions
+5 -4
View File
@@ -53,6 +53,7 @@ const Header = (props) => {
"/myportal/advancedsearch",
"/myportal/advancedsearchresults",
"/myportal/case/[ticketnumber]",
"/status",
];
const hasContactLink = [
@@ -73,14 +74,14 @@ const Header = (props) => {
const handleLogout = () => {
console.info("////////////\n" + "logout" + "\n////////////");
window.localStorage.clear(),
(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: "/" }),
signOut({
callbackUrl: locale == "cy" ? "/cy/allgofnodi" : "/logout",
});
}));
};
return (
@@ -242,7 +243,7 @@ const Header = (props) => {
Object.keys(router.query)
.map(
(key) =>
key + "=" + router.query[key]
key + "=" + router.query[key],
)
.join("&")
: router.pathname
@@ -268,7 +269,7 @@ const Header = (props) => {
locale == "en" ? "cy" : "en",
{
path: "/",
}
},
);
}}
>