[#64] added creation modal to list and api call

This commit is contained in:
Camille Moussu
2025-09-11 16:59:03 +02:00
committed by Benoit TELLIER
parent d1140a47b2
commit 9d43c15ee0
6 changed files with 152 additions and 93 deletions
+23 -21
View File
@@ -18,28 +18,30 @@ export default function ImportAlert() {
return (
<>
{Object.keys(calendars).map((calendarId) =>
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
calendars[calendarId]?.events
? 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={calendars[calendarId].events[id].uid}
>
<Alert
severity="error"
onClose={() =>
toggleEventAlert(calendars[calendarId].events[id].uid)
}
>
{calendars[calendarId].events[id].error}
</Alert>
</Collapse>
);
})
return (
<Collapse
in={isVisible}
key={calendars[calendarId].events[id].uid}
>
<Alert
severity="error"
onClose={() =>
toggleEventAlert(calendars[calendarId].events[id].uid)
}
>
{calendars[calendarId].events[id].error}
</Alert>
</Collapse>
);
})
: []
)}
</>
);