mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
feat: adding dexie
This commit is contained in:
parent
d97c5b894a
commit
50028fbfd8
2 changed files with 12 additions and 12 deletions
|
@ -26,7 +26,7 @@ import {
|
|||
} from "@renderer/features";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { UserFriendModal } from "./pages/shared-modals/user-friend-modal";
|
||||
import { migrationWorker } from "./workers";
|
||||
// import { migrationWorker } from "./workers";
|
||||
import { repacksContext } from "./context";
|
||||
|
||||
export interface AppProps {
|
||||
|
|
|
@ -90,19 +90,9 @@ export function useUserDetails() {
|
|||
username: userDetails?.username || "",
|
||||
});
|
||||
},
|
||||
[updateUserDetails]
|
||||
[updateUserDetails, userDetails?.username]
|
||||
);
|
||||
|
||||
const fetchFriendRequests = useCallback(async () => {
|
||||
return window.electron
|
||||
.getFriendRequests()
|
||||
.then((friendRequests) => {
|
||||
syncFriendRequests();
|
||||
dispatch(setFriendRequests(friendRequests));
|
||||
})
|
||||
.catch(() => {});
|
||||
}, [dispatch]);
|
||||
|
||||
const syncFriendRequests = useCallback(async () => {
|
||||
return window.electron
|
||||
.syncFriendRequests()
|
||||
|
@ -112,6 +102,16 @@ export function useUserDetails() {
|
|||
.catch(() => {});
|
||||
}, [dispatch]);
|
||||
|
||||
const fetchFriendRequests = useCallback(async () => {
|
||||
return window.electron
|
||||
.getFriendRequests()
|
||||
.then((friendRequests) => {
|
||||
syncFriendRequests();
|
||||
dispatch(setFriendRequests(friendRequests));
|
||||
})
|
||||
.catch(() => {});
|
||||
}, [dispatch, syncFriendRequests]);
|
||||
|
||||
const showFriendsModal = useCallback(
|
||||
(initialTab: UserFriendModalTab, userId: string) => {
|
||||
dispatch(setFriendsModalVisible({ initialTab, userId }));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue