Syncing logic improvements... Notification logic refactor (stop spamming notifications on sync)

This commit is contained in:
Milan Paunovic
2024-10-20 13:16:54 +02:00
parent da071736d0
commit 055c40d1e6
5 changed files with 100 additions and 88 deletions

View File

@ -9,7 +9,8 @@ export const useFetchAndSaveAppleEvents = () => {
return useMutation({
mutationKey: ["fetchAndSaveAppleEvents"],
mutationFn: async (token?: string, email?: string) => {
mutationFn: async ({token, email}: { token?: string, email?: string }) => {
console.log("CALLL")
const timeMin = new Date(new Date().setFullYear(new Date().getFullYear() - 1));
const timeMax = new Date(new Date().setFullYear(new Date().getFullYear() + 5));
try {