[#48] fixed drag and drop waiting for api call to be done to show updated event

This commit is contained in:
Camille Moussu
2025-08-19 15:27:54 +02:00
parent 86b57c2338
commit 22ebf31f77
2 changed files with 13 additions and 3 deletions
+4 -2
View File
@@ -15,6 +15,7 @@ import CalendarSelection from "./CalendarSelection";
import {
getCalendarDetailAsync,
putEventAsync,
updateEventLocal,
} from "../../features/Calendars/CalendarSlice";
import ImportAlert from "../../features/Events/ImportAlert";
import {
@@ -330,8 +331,9 @@ export default function CalendarApp() {
start: computedNewStart,
end: computedNewEnd,
} as CalendarEvent;
console.log(newEvent);
console.log(arg);
dispatch(
updateEventLocal({ calId: newEvent.calId, event: newEvent })
);
dispatch(
putEventAsync({ cal: calendars[newEvent.calId], newEvent })
);