mirror of
https://github.com/urosran/cally.git
synced 2025-11-26 16:34:54 +00:00
Deletion fix
This commit is contained in:
@ -29,6 +29,8 @@ export interface Notification {
|
||||
export const useGetNotifications = () => {
|
||||
const { user, profileData } = useAuthContext();
|
||||
|
||||
console.log(profileData?.familyId)
|
||||
|
||||
return useQuery<Notification[], Error>({
|
||||
queryKey: ["notifications", user?.uid],
|
||||
queryFn: async () => {
|
||||
@ -44,11 +46,13 @@ export const useGetNotifications = () => {
|
||||
id: doc.id,
|
||||
...data,
|
||||
timestamp: new Date(data.timestamp.seconds * 1000 + data.timestamp.nanoseconds / 1e6),
|
||||
date: data.date ? new Date(data.date.seconds * 1000 + data.date.nanoseconds / 1e6) : undefined
|
||||
date: data.date ? new Date(data.date.seconds * 1000 + data.date.nanoseconds / 1e6) : undefined,
|
||||
};
|
||||
});
|
||||
},
|
||||
refetchOnWindowFocus: true,
|
||||
staleTime: 60000,
|
||||
staleTime: Infinity,
|
||||
gcTime: Infinity,
|
||||
placeholderData: (previousData) => previousData,
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user