add missing call to get user

This commit is contained in:
Zamitto 2024-06-16 22:12:35 -03:00
parent d048d562a3
commit 63e74648c4
2 changed files with 6 additions and 2 deletions

View File

@ -13,7 +13,7 @@ export function SidebarProfile() {
}; };
const handleClickLogin = () => { const handleClickLogin = () => {
window.electron.openExternal("https://auth.losbroxas.org"); window.electron.openExternal("https://auth.hydra.losbroxas.org");
}; };
if (isLoading) return null; if (isLoading) return null;

View File

@ -1,4 +1,4 @@
import { useCallback, useState } from "react"; import { useCallback, useEffect, useState } from "react";
import { useAppDispatch, useAppSelector } from "./redux"; import { useAppDispatch, useAppSelector } from "./redux";
import { setUserAuth } from "@renderer/features"; import { setUserAuth } from "@renderer/features";
@ -25,6 +25,10 @@ export function useUserAuth() {
}); });
}, [dispatch]); }, [dispatch]);
useEffect(() => {
updateUserAuth();
}, []);
const clearUserAuth = useCallback(async () => { const clearUserAuth = useCallback(async () => {
dispatch(setUserAuth(null)); dispatch(setUserAuth(null));
}, [dispatch]); }, [dispatch]);