pass showlogin vars to pages and components
This commit is contained in:
@@ -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: "/",
|
||||
}
|
||||
},
|
||||
);
|
||||
}}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user