From f7144e7cf4016c25901f2b37522a8ec8b536dda0 Mon Sep 17 00:00:00 2001 From: Brandon Egger Date: Mon, 4 Sep 2023 00:25:10 -0500 Subject: [PATCH] switch to handle submit --- src/components/admin/resources/form.tsx | 19 ++++++++++++------- src/components/forms/textInput.tsx | 2 -- src/pages/resources/create.tsx | 7 ++++++- 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/src/components/admin/resources/form.tsx b/src/components/admin/resources/form.tsx index 9bc14ec..fa689f8 100644 --- a/src/components/admin/resources/form.tsx +++ b/src/components/admin/resources/form.tsx @@ -346,7 +346,10 @@ function ResourceSummarySubForm({ }: { resource?: ResourceUpdateInput; }) { - const { register } = useFormContext(); + const { + register, + formState: { errors }, + } = useFormContext(); return (
@@ -360,14 +363,16 @@ function ResourceSummarySubForm({
@@ -394,7 +399,7 @@ function ResourceSummarySubForm({ @@ -410,7 +415,7 @@ function ResourceSummarySubForm({ @@ -452,7 +457,7 @@ const ResourceDescriptionSubForm = () => {