mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
feat: clearing backup history on sign out
This commit is contained in:
parent
0ea7329aa3
commit
89b830fe9a
1 changed files with 2 additions and 0 deletions
|
@ -14,6 +14,7 @@ import type {
|
||||||
UserDetails,
|
UserDetails,
|
||||||
} from "@types";
|
} from "@types";
|
||||||
import { UserFriendModalTab } from "@renderer/pages/shared-modals/user-friend-modal";
|
import { UserFriendModalTab } from "@renderer/pages/shared-modals/user-friend-modal";
|
||||||
|
import { gameBackupsTable } from "@renderer/dexie";
|
||||||
|
|
||||||
export function useUserDetails() {
|
export function useUserDetails() {
|
||||||
const dispatch = useAppDispatch();
|
const dispatch = useAppDispatch();
|
||||||
|
@ -32,6 +33,7 @@ export function useUserDetails() {
|
||||||
dispatch(setUserDetails(null));
|
dispatch(setUserDetails(null));
|
||||||
dispatch(setProfileBackground(null));
|
dispatch(setProfileBackground(null));
|
||||||
|
|
||||||
|
await gameBackupsTable.clear();
|
||||||
window.localStorage.removeItem("userDetails");
|
window.localStorage.removeItem("userDetails");
|
||||||
}, [dispatch]);
|
}, [dispatch]);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue