🐛 fix(layout): Remove unnecessary cookie initialization in Logout function
This commit is contained in:
parent
68bc18f584
commit
3065c3a0df
@ -42,7 +42,6 @@ export function getRedirectUrl() {
|
|||||||
|
|
||||||
export function Logout() {
|
export function Logout() {
|
||||||
if (!isBrowser()) return;
|
if (!isBrowser()) return;
|
||||||
const cookies = new Cookies(null, { path: '/' });
|
|
||||||
cookies.remove('Authorization');
|
cookies.remove('Authorization');
|
||||||
const pathname = location.pathname;
|
const pathname = location.pathname;
|
||||||
if (!['', '/'].includes(pathname)) {
|
if (!['', '/'].includes(pathname)) {
|
||||||
|
|||||||
@ -41,7 +41,7 @@ export function getRedirectUrl() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function Logout() {
|
export function Logout() {
|
||||||
const cookies = new Cookies(null, { path: '/' });
|
if (!isBrowser()) return;
|
||||||
cookies.remove('Authorization');
|
cookies.remove('Authorization');
|
||||||
const pathname = location.pathname;
|
const pathname = location.pathname;
|
||||||
if (!['', '/', '/auth', '/tos'].includes(pathname)) {
|
if (!['', '/', '/auth', '/tos'].includes(pathname)) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user