From 4a44bda1a54dba517792c1641530c5098a3841f8 Mon Sep 17 00:00:00 2001 From: Timur Ercan Date: Mon, 6 Mar 2023 14:17:33 +0100 Subject: [PATCH 1/3] =?UTF-8?q?=F0=9F=8E=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web/components/signup.tsx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/apps/web/components/signup.tsx b/apps/web/components/signup.tsx index 5f05a245a..96e356777 100644 --- a/apps/web/components/signup.tsx +++ b/apps/web/components/signup.tsx @@ -14,12 +14,12 @@ type FormValues = { }; export default function Signup(props: { source: string }) { - const methods = useForm({}); + const form = useForm({}); const { register, trigger, formState: { errors, isSubmitting }, - } = methods; + } = form; const handleErrors = async (resp: Response) => { if (!resp.ok) { @@ -52,7 +52,7 @@ export default function Signup(props: { source: string }) { ) .catch((err) => { toast.dismiss(); - methods.setError("apiError", { message: err.message }); + form.setError("apiError", { message: err.message }); }); }; @@ -123,11 +123,11 @@ export default function Signup(props: { source: string }) { {renderApiError()} {renderFormValidation()} - +
{ - methods.clearErrors(); + form.clearErrors(); trigger(); }} className="mt-8 space-y-6" @@ -175,7 +175,7 @@ export default function Signup(props: { source: string }) { + + ))} + + +
+
@@ -357,7 +408,7 @@ const RecipientsPage: NextPageWithLayout = (props: any) => {

{`"${props.document.title}" will be sent to ${ - signers.filter( + formValues.filter( (s: any) => s.email && s.sendStatus != "SENT" ).length } recipients.`}