MCPcopy Create free account
hub / github.com/WebDevSimplified/calendly-clone / onSubmit

Function onSubmit

src/components/forms/EventForm.tsx:55–65  ·  view source on GitHub ↗
(values: z.infer<typeof eventFormSchema>)

Source from the content-addressed store, hash-verified

53 })
54
55 async function onSubmit(values: z.infer<typeof eventFormSchema>) {
56 const action =
57 event == null ? createEvent : updateEvent.bind(null, event.id)
58 const data = await action(values)
59
60 if (data?.error) {
61 form.setError("root", {
62 message: "There was an error saving your event",
63 })
64 }
65 }
66
67 return (
68 <Form {...form}>

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected