chore: update survey edit form

This commit is contained in:
moonrailgun 2024-10-11 00:58:10 +08:00
parent 8a6a75f3f5
commit cbd6821def

View File

@ -44,7 +44,7 @@ const addFormSchema = z.object({
}), }),
feedChannelIds: z.array(z.string()), feedChannelIds: z.array(z.string()),
feedTemplate: z.string(), feedTemplate: z.string(),
webhookUrl: z.string().url(), webhookUrl: z.string().url().or(z.literal('')),
}); });
export type SurveyEditFormValues = z.infer<typeof addFormSchema>; export type SurveyEditFormValues = z.infer<typeof addFormSchema>;
@ -300,7 +300,7 @@ export const SurveyEditForm: React.FC<SurveyEditFormProps> = React.memo(
name="webhookUrl" name="webhookUrl"
render={({ field }) => ( render={({ field }) => (
<FormItem> <FormItem>
<FormLabel>{t('Webhook Url')}</FormLabel> <FormLabel optional={true}>{t('Webhook Url')}</FormLabel>
<FormControl className="w-full"> <FormControl className="w-full">
<Input {...field} /> <Input {...field} />
</FormControl> </FormControl>