Skip to content

Commit

Permalink
🐛 fix(layout): Remove unnecessary cookie initialization in Logout fun…
Browse files Browse the repository at this point in the history
…ction
  • Loading branch information
web-ppanel committed Dec 30, 2024
1 parent 68bc18f commit 3065c3a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion apps/admin/utils/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down
2 changes: 1 addition & 1 deletion apps/user/utils/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 3065c3a

Please sign in to comment.