mirror of
https://github.com/jambonz/jambonz-webapp.git
synced 2026-05-06 08:46:58 +00:00
don't remove storeAlertsLastViewed on logout (#594)
This commit is contained in:
+1
-1
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user