diff --git a/apps/web/src/components/account/account-register-form.tsx b/apps/web/src/components/account/account-register-form.tsx index 28bc320..bd126d9 100644 --- a/apps/web/src/components/account/account-register-form.tsx +++ b/apps/web/src/components/account/account-register-form.tsx @@ -31,6 +31,7 @@ function AccountRegisterForm() { handleSubmit, setValue, getValues, + watch, formState: { errors }, } = useForm(); const mutation = useMutation({ @@ -53,6 +54,7 @@ function AccountRegisterForm() { const onSubmit = handleSubmit((data) => { mutation.mutate(data); }); + const confirmTermsAndPrivacy = watch("confirmTermsAndPrivacy"); return (
{ setValue( "confirmTermsAndPrivacy", - !getValues("confirmTermsAndPrivacy") + !confirmTermsAndPrivacy ); }} - checked={getValues("confirmTermsAndPrivacy")} + checked={confirmTermsAndPrivacy} > 註冊即表示您同意我們的{" "}