update grouping

This commit is contained in:
Andrew Gundersen 2021-03-22 09:12:09 -05:00
commit 447a68e2de
8 changed files with 86 additions and 106 deletions

View file

@ -21,8 +21,10 @@ if (token) {
window.localStorage.setItem(AUTH_KEY, token);
}
// Load key and invoke onAuthSession to try key-login.
const authToken = async () => {
const { invoke } = useIpc();
console.log("Calling auth token.")
const { invoke } = useIpc();
try {
token = window.localStorage.getItem(AUTH_KEY);
@ -43,7 +45,7 @@ const authToken = async () => {
}
}
// authenticate on auth event
// Gets called on socket open.
window.ipcRenderer.on("auth", async (_event, _arg) => {
await authToken();
});