import Cookies from 'js-cookie'; export const routerConfig = { login: () => { sessionStorage.clear(); if (window.location.href.includes('localhost')) { window.location.href = `${import.meta.env.VITE_PUBLIC_PATH}login`; } else if (window.location.href.includes('http://100.68.2.97:4200/')) { window.location.href = `${import.meta.env.VITE_PUBLIC_PATH}login`; } else { window.location.href = `${import.meta.env.VITE_PUBLIC_PATH}login`; } }, logout: () => { Cookies.remove('nervsid'); sessionStorage.clear(); if (window.location.href.includes('localhost')) { window.location.href = `${import.meta.env.VITE_PUBLIC_PATH}login`; } else { window.location.href = '/logout'; } }, };