- Fixed wrong method being called when fetching microsoft events

This commit is contained in:
Dejan
2024-10-05 22:11:22 +02:00
parent d1d3fd0ca1
commit 2234fac075

View File

@ -83,7 +83,7 @@ const CalendarSettingsPage = (props: {
startDateTime.toISOString().slice(0, -5) + "Z",
endDateTime.toISOString().slice(0, -5) + "Z",
).then((response) => {
response?.forEach((item) => createEvent(item));
response?.forEach((item) => saveData(item));
});
};
@ -207,6 +207,7 @@ const CalendarSettingsPage = (props: {
width={40}
height={40}
style={{ borderRadius: 50 }}
marginR-10
centerV
centerH
>
@ -226,6 +227,7 @@ const CalendarSettingsPage = (props: {
width={40}
height={40}
style={{ borderRadius: 50 }}
marginR-10
centerV
centerH
>
@ -242,6 +244,26 @@ const CalendarSettingsPage = (props: {
<View style={styles.card}>
<Text text70>Calendars</Text>
<View style={{ marginTop: 20 }}>
<Button
label={"Sync Outlook"}
iconSource={() => (
<View
backgroundColor="#ededed"
width={40}
height={40}
style={{ borderRadius: 50 }}
marginR-10
centerV
centerH
>
<Ionicons name="logo-microsoft" size={22} color="#979797" />
</View>
)}
backgroundColor="white"
color="#464039"
borderRadius={15}
onPress={fetchAndSaveMicrosoftEvents}
/>
{profileData?.googleToken !== undefined && (
<Button
label={"Sync Google"}
@ -264,28 +286,6 @@ const CalendarSettingsPage = (props: {
onPress={fetchAndSaveGoogleEvents}
/>
)}
{profileData?.microsoftToken !== undefined && (
<Button
label={"Sync Outlook"}
iconSource={() => (
<View
backgroundColor="#ededed"
width={40}
height={40}
style={{ borderRadius: 50 }}
marginR-10
centerV
centerH
>
<Ionicons name="logo-microsoft" size={22} color="#979797" />
</View>
)}
backgroundColor="white"
color="#464039"
borderRadius={15}
onPress={fetchAndSaveMicrosoftEvents}
/>
)}
</View>
</View>
</View>