async function onSubmit(values: z.infer<typeof formSchema>) {
try {
await createImage({
prompt: values.prompt,
type: values.type,
});
router.refresh();
} catch (cause) {
console.log(cause);
toast({
title: "Error",
description:
"An error occurred while creating your image. Please try again.",
});
}
}
async function onSubmit(values: z.infer<typeof formSchema>) {
try {
await createImage({
prompt: values.prompt,
type: values.type,
});
router.refresh();
} catch (cause) {
console.log(cause);
toast({
title: "Error",
description:
"An error occurred while creating your image. Please try again.",
});
}
}