Merge branch 'feature/user-profile' of github.com:hydralauncher/hydra into feature/user-profile

This commit is contained in:
Chubby Granny Chaser 2024-06-17 02:13:58 +01:00
commit e7ba7b87b6
No known key found for this signature in database
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]);