MCPcopy Create free account
hub / github.com/code100x/cms / handleAddEvent

Function handleAddEvent

src/components/big-calendar/calendar.tsx:95–106  ·  view source on GitHub ↗
(values: FormValues)

Source from the content-addressed store, hash-verified

93 };
94
95 const handleAddEvent = async (values: FormValues) => {
96 const newEvent: Omit<CalendarEvent, 'id'> = {
97 title: values.title,
98 start: combineDateAndTime(values.start, values.startTime),
99 end: combineDateAndTime(values.end, values.endTime),
100 videoLink: values.videoLink,
101 notes: values.notes,
102 };
103 await addEvent(newEvent);
104 loadEvents();
105 setIsAddEventDialogOpen(false);
106 };
107
108 const handleUpdateEvent = async (values: FormValues) => {
109 if (selectedEvent) {

Callers

nothing calls this directly

Calls 3

addEventFunction · 0.90
combineDateAndTimeFunction · 0.85
loadEventsFunction · 0.85

Tested by

no test coverage detected