- Implemented connecting multiple accounts for google

This commit is contained in:
Dejan
2024-10-20 18:34:48 +02:00
parent 80cc184498
commit bb72c6c011
4 changed files with 90 additions and 51 deletions
+3 -3
View File
@@ -14,12 +14,12 @@ export const useFetchAndSaveGoogleEvents = () => {
const timeMin = new Date(new Date().setFullYear(new Date().getFullYear() - 1));
const timeMax = new Date(new Date().setFullYear(new Date().getFullYear() + 5));
console.log("Token: ", token ?? profileData?.googleToken);
console.log("Token: ", token);
try {
const response = await fetchGoogleCalendarEvents(
token ?? profileData?.googleToken,
email ?? profileData?.googleMail,
token,
email,
profileData?.familyId,
timeMin.toISOString().slice(0, -5) + "Z",
timeMax.toISOString().slice(0, -5) + "Z"