From 89b830fe9abb91d265af58e1a439bf234b7357ed Mon Sep 17 00:00:00 2001 From: Chubby Granny Chaser Date: Wed, 25 Sep 2024 20:44:56 +0100 Subject: [PATCH] feat: clearing backup history on sign out --- src/renderer/src/hooks/use-user-details.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/renderer/src/hooks/use-user-details.ts b/src/renderer/src/hooks/use-user-details.ts index 50e2fad9..ed2c3b14 100644 --- a/src/renderer/src/hooks/use-user-details.ts +++ b/src/renderer/src/hooks/use-user-details.ts @@ -14,6 +14,7 @@ import type { UserDetails, } from "@types"; import { UserFriendModalTab } from "@renderer/pages/shared-modals/user-friend-modal"; +import { gameBackupsTable } from "@renderer/dexie"; export function useUserDetails() { const dispatch = useAppDispatch(); @@ -32,6 +33,7 @@ export function useUserDetails() { dispatch(setUserDetails(null)); dispatch(setProfileBackground(null)); + await gameBackupsTable.clear(); window.localStorage.removeItem("userDetails"); }, [dispatch]);