diff --git a/src/components/admin/resources/form.tsx b/src/components/admin/resources/form.tsx index 488c3e4..dbcc6b8 100644 --- a/src/components/admin/resources/form.tsx +++ b/src/components/admin/resources/form.tsx @@ -83,7 +83,11 @@ const LinkModal = ({ setOpen: Dispatch>; }) => { const { setValue, getValues } = useFormContext(); - const { register, handleSubmit } = useForm(); + const { + register, + handleSubmit, + setValue: setLocalFormValue, + } = useForm(); const platformTypeOptions = [ { label: "Website", @@ -109,6 +113,8 @@ const LinkModal = ({ values.push(data); setValue("platform_links", values); setOpen(false); + setLocalFormValue("platform", Platform.WEBSITE); + setLocalFormValue("link", ""); }; return (