mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
Merge branch 'main' of github.com:hydralauncher/hydra into fix/adding-sorting-to-repacks-modal
This commit is contained in:
commit
d8158bb80e
47 changed files with 584 additions and 464 deletions
|
@ -93,12 +93,8 @@ export function App() {
|
|||
dispatch(setProfileBackground(profileBackground));
|
||||
}
|
||||
|
||||
window.electron.isUserLoggedIn().then((isLoggedIn) => {
|
||||
if (isLoggedIn) {
|
||||
fetchUserDetails().then((response) => {
|
||||
if (response) updateUserDetails(response);
|
||||
});
|
||||
}
|
||||
fetchUserDetails().then((response) => {
|
||||
if (response) updateUserDetails(response);
|
||||
});
|
||||
}, [fetchUserDetails, updateUserDetails, dispatch]);
|
||||
|
||||
|
|
1
src/renderer/src/declaration.d.ts
vendored
1
src/renderer/src/declaration.d.ts
vendored
|
@ -100,7 +100,6 @@ declare global {
|
|||
|
||||
/* Misc */
|
||||
openExternal: (src: string) => Promise<void>;
|
||||
isUserLoggedIn: () => Promise<boolean>;
|
||||
getVersion: () => Promise<string>;
|
||||
ping: () => string;
|
||||
getDefaultDownloadsPath: () => Promise<string>;
|
||||
|
|
|
@ -57,8 +57,14 @@ export function useUserDetails() {
|
|||
);
|
||||
|
||||
const fetchUserDetails = useCallback(async () => {
|
||||
return window.electron.getMe();
|
||||
}, []);
|
||||
return window.electron.getMe().then((userDetails) => {
|
||||
if (userDetails == null) {
|
||||
clearUserDetails();
|
||||
}
|
||||
|
||||
return userDetails;
|
||||
});
|
||||
}, [clearUserDetails]);
|
||||
|
||||
const patchUser = useCallback(
|
||||
async (displayName: string, imageProfileUrl: string | null) => {
|
||||
|
|
|
@ -122,7 +122,7 @@ export function HeroPanelActions() {
|
|||
<Button
|
||||
onClick={() => setShowGameOptionsModal(true)}
|
||||
theme="outline"
|
||||
disabled={deleting || isGameRunning}
|
||||
disabled={deleting}
|
||||
className={styles.heroPanelAction}
|
||||
>
|
||||
<GearIcon />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue