MCPcopy Create free account
hub / github.com/WebDevSimplified/course-platform / onSubmit

Function onSubmit

src/features/courses/components/CourseForm.tsx:39–44  ·  view source on GitHub ↗
(values: z.infer<typeof courseSchema>)

Source from the content-addressed store, hash-verified

37 })
38
39 async function onSubmit(values: z.infer<typeof courseSchema>) {
40 const action =
41 course == null ? createCourse : updateCourse.bind(null, course.id)
42 const data = await action(values)
43 actionToast({ actionData: data })
44 }
45
46 return (
47 <Form {...form}>

Callers

nothing calls this directly

Calls 1

actionToastFunction · 0.90

Tested by

no test coverage detected