don't remove storeAlertsLastViewed on logout (#594)

This commit is contained in:
Sam Machin
2026-04-15 18:08:17 +01:00
committed by GitHub
parent b18e00c172
commit b83794c361
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -173,7 +173,7 @@ export const useProvideAuth = (): AuthStateContext => {
}
})
.catch((error) => {
localStorage.clear();
clearLocalStorage();
sessionStorage.clear();
sessionStorage.setItem(SESS_FLASH_MSG, MSG_LOGGED_OUT);
window.location.href = ROUTE_LOGIN;
+1 -1
View File
@@ -145,7 +145,7 @@ export const checkLocation = () => {
};
export const clearLocalStorage = () => {
const toKeep = [storeActiveSP, storeAccountFilter];
const toKeep = [storeActiveSP, storeAccountFilter, storeAlertsLastViewed];
Object.keys(localStorage).forEach((key) => {
if (!toKeep.includes(key)) {
localStorage.removeItem(key);