[#30] changed logic to load datas to get all events from calendars

This commit is contained in:
Camille Moussu
2025-07-15 14:25:44 +02:00
parent 03e56bd4f6
commit de22a6edfb
10 changed files with 62 additions and 56 deletions
+13 -7
View File
@@ -18,18 +18,24 @@ export default function ImportAlert() {
return (
<>
{Object.keys(calendars).map((calendarId) =>
calendars[calendarId].events
.filter((event) => event.error)
.map((event) => {
const isVisible = visibleAlerts[event.uid] ?? true; // default to visible
Object.keys(calendars[calendarId].events)
.filter((id) => calendars[calendarId].events[id].error)
.map((id) => {
const isVisible =
visibleAlerts[calendars[calendarId].events[id].uid] ?? true; // default to visible
return (
<Collapse in={isVisible} key={event.uid}>
<Collapse
in={isVisible}
key={calendars[calendarId].events[id].uid}
>
<Alert
severity="error"
onClose={() => toggleEventAlert(event.uid)}
onClose={() =>
toggleEventAlert(calendars[calendarId].events[id].uid)
}
>
{event.error}
{calendars[calendarId].events[id].error}
</Alert>
</Collapse>
);