[MM-40025] Stop app from redirecting to tabs when not logged in (#1870)

This commit is contained in:
Devin Binnie
2021-11-22 09:49:53 -05:00
committed by GitHub
parent 4fa89a5fce
commit 3b4437e480
4 changed files with 25 additions and 3 deletions

View File

@@ -23,6 +23,7 @@ import {
CLOSE_TEAMS_DROPDOWN,
BROWSER_HISTORY_PUSH,
APP_LOGGED_IN,
APP_LOGGED_OUT,
GET_VIEW_NAME,
GET_VIEW_WEBCONTENTS_ID,
} from 'common/communication';
@@ -256,6 +257,9 @@ window.addEventListener('storage', (e) => {
if (e.key === '__login__' && e.storageArea === localStorage && e.newValue) {
ipcRenderer.send(APP_LOGGED_IN, viewName);
}
if (e.key === '__logout__' && e.storageArea === localStorage && e.newValue) {
ipcRenderer.send(APP_LOGGED_OUT, viewName);
}
});
/* eslint-enable no-magic-numbers */