(values: z.infer<typeof eventFormSchema>)
| 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}> |
nothing calls this directly
no outgoing calls
no test coverage detected