Hey guys, I'm trying to create a modal with a form in it (specifically using shadcn's Dialog wrapped with shadcn's Form and <form>, however my <Button type="submit" /> is having no effect when I click it, any ideas?
const formSchema = z.object({
name: z.string().min(2, {
message: "Foo name must be at least 2 characters.",
}),
description: z.string().min(2, {
message: "",
}),
});
export function NewFooModal() {
const form = useForm<z.infer<typeof formSchema>>({
resolver: zodResolver(formSchema),
defaultValues: {
name: "",
},
});
function onSubmit(values: z.infer<typeof formSchema>) {
console.log(values)
}
return (...)
}```
