feat: refactor hydra api

This commit is contained in:
Zamitto 2024-07-02 14:55:38 -03:00
parent dd23358a95
commit 9e11d6c098
15 changed files with 55 additions and 76 deletions

View file

@ -93,14 +93,8 @@ export function App() {
dispatch(setProfileBackground(profileBackground));
}
window.electron.isUserLoggedIn().then((isLoggedIn) => {
if (isLoggedIn) {
fetchUserDetails().then((response) => {
if (response) updateUserDetails(response);
});
} else {
clearUserDetails();
}
fetchUserDetails().then((response) => {
if (response) updateUserDetails(response);
});
}, [fetchUserDetails, updateUserDetails, dispatch]);

View file

@ -100,7 +100,6 @@ declare global {
/* Misc */
openExternal: (src: string) => Promise<void>;
isUserLoggedIn: () => Promise<boolean>;
getVersion: () => Promise<string>;
ping: () => string;
getDefaultDownloadsPath: () => Promise<string>;