Новые правки

This commit is contained in:
Web-serfer 2026-05-07 18:50:53 +05:00
parent b298e69f7b
commit 51efcbd00a
3 changed files with 6 additions and 18 deletions

View file

@ -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();
};
};

View file

@ -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>