Новые правки
This commit is contained in:
parent
b298e69f7b
commit
51efcbd00a
3 changed files with 6 additions and 18 deletions
|
|
@ -584,10 +584,8 @@ import { NAV_LINKS, COMPANY } from '@constants';
|
|||
localStorage.removeItem('user');
|
||||
localStorage.removeItem('pocketbase_auth');
|
||||
|
||||
// Через 3 сек возвращаем кнопку входа
|
||||
setTimeout(() => {
|
||||
restoreLoginButton();
|
||||
}, 3000);
|
||||
// Полностью перезагружаем страницу — SSR проверит куки и обновит состояние
|
||||
window.location.reload();
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -112,10 +112,8 @@ const firstLetter = userName ? userName.charAt(0).toUpperCase() : userEmail?.cha
|
|||
localStorage.removeItem('user');
|
||||
localStorage.removeItem('pocketbase_auth');
|
||||
|
||||
// Перенаправляем на текущую страницу с параметром loggedout
|
||||
const currentUrl = window.location.pathname + window.location.search + window.location.hash;
|
||||
const separator = currentUrl.includes('?') ? '&' : '?';
|
||||
window.location.href = currentUrl + separator + 'loggedout=true';
|
||||
// Полностью перезагружаем страницу — SSR проверит куки и обновит состояние
|
||||
window.location.reload();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
Loading…
Add table
Add a link
Reference in a new issue