feature/IO-2916-Remove-Beta-Switch-AIO - Remove cookie
Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
@@ -116,6 +116,19 @@ function Header({
|
|||||||
|
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
|
export const deleteBetaCookie = () => {
|
||||||
|
const cookieExists = document.cookie.split("; ").some((row) => row.startsWith(`betaSwitchImex=`));
|
||||||
|
if (cookieExists) {
|
||||||
|
const domain = window.location.hostname.split(".").slice(-2).join(".");
|
||||||
|
document.cookie = `betaSwitchImex=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; domain=.${domain}`;
|
||||||
|
console.log(`betaSwitchImex cookie deleted`);
|
||||||
|
} else {
|
||||||
|
console.log(`betaSwitchImex cookie does not exist`);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
deleteBetaCookie();
|
||||||
|
|
||||||
const accountingChildren = [];
|
const accountingChildren = [];
|
||||||
|
|
||||||
if (
|
if (
|
||||||
|
|||||||
Reference in New Issue
Block a user