🐛 fix(layout): Remove unnecessary cookie initialization in Logout function

This commit is contained in:
web@ppanel 2024-12-30 22:53:06 +07:00
parent 68bc18f584
commit 3065c3a0df
2 changed files with 1 additions and 2 deletions

View File

@ -42,7 +42,6 @@ export function getRedirectUrl() {
export function Logout() {
if (!isBrowser()) return;
const cookies = new Cookies(null, { path: '/' });
cookies.remove('Authorization');
const pathname = location.pathname;
if (!['', '/'].includes(pathname)) {

View File

@ -41,7 +41,7 @@ export function getRedirectUrl() {
}
export function Logout() {
const cookies = new Cookies(null, { path: '/' });
if (!isBrowser()) return;
cookies.remove('Authorization');
const pathname = location.pathname;
if (!['', '/', '/auth', '/tos'].includes(pathname)) {