[#31] fixed sending data

This commit is contained in:
Camille Moussu
2025-07-23 11:33:10 +02:00
parent b1ceebfc7d
commit 08789cb6f3
6 changed files with 61 additions and 111 deletions
+2 -13
View File
@@ -62,8 +62,6 @@ function EventPopover({
}, [selectedRange]);
const handleSave = async () => {
if (!calendarid) return; // Prevent crash if no calendar is selected
const newEvent: CalendarEvent = {
title,
start: new Date(start),
@@ -86,12 +84,7 @@ function EventPopover({
transp: "OPAQUE",
color: userPersonnalCalendars[calendarid]?.color,
};
// dispatch(
// addEvent({
// calendarUid: userPersonnalCalendars[calendarid]?.id,
// event: newEvent,
// })
// );
dispatch(
putEventAsync({
cal: userPersonnalCalendars[calendarid],
@@ -208,11 +201,7 @@ function EventPopover({
>
Cancel
</Button>
<Button
variant="contained"
onClick={handleSave}
disabled={!(calendarid ?? false) || !title}
>
<Button variant="contained" onClick={handleSave} disabled={!title}>
Save
</Button>
</Box>