From 86c2e9f0e4a040561d5123652c636858d0413752 Mon Sep 17 00:00:00 2001 From: Harsh Singh Date: Tue, 19 Nov 2024 18:43:35 +0530 Subject: [PATCH] fix: uncontrolled input to controlled in SigninUpForm (#8536) Fixes: #8535 --------- Co-authored-by: Devessier --- .../sign-in-up/components/SignInUpForm.tsx | 20 +++++++++---------- .../auth/sign-in-up/hooks/useSignInUpForm.ts | 3 +++ 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/packages/twenty-front/src/modules/auth/sign-in-up/components/SignInUpForm.tsx b/packages/twenty-front/src/modules/auth/sign-in-up/components/SignInUpForm.tsx index 54474bc1a3..bfc3a36e8d 100644 --- a/packages/twenty-front/src/modules/auth/sign-in-up/components/SignInUpForm.tsx +++ b/packages/twenty-front/src/modules/auth/sign-in-up/components/SignInUpForm.tsx @@ -1,14 +1,4 @@ import { FooterNote } from '@/auth/sign-in-up/components/FooterNote'; -import { - HorizontalSeparator, - ActionLink, - IconGoogle, - IconKey, - IconMicrosoft, - Loader, - MainButton, - StyledText, -} from 'twenty-ui'; import { useHandleResetPassword } from '@/auth/sign-in-up/hooks/useHandleResetPassword'; import { SignInUpMode, useSignInUp } from '@/auth/sign-in-up/hooks/useSignInUp'; import { @@ -29,6 +19,16 @@ import { useMemo, useState } from 'react'; import { Controller } from 'react-hook-form'; import { useRecoilState, useRecoilValue } from 'recoil'; import { Key } from 'ts-key-enum'; +import { + ActionLink, + HorizontalSeparator, + IconGoogle, + IconKey, + IconMicrosoft, + Loader, + MainButton, + StyledText, +} from 'twenty-ui'; import { isDefined } from '~/utils/isDefined'; const StyledContentContainer = styled.div` diff --git a/packages/twenty-front/src/modules/auth/sign-in-up/hooks/useSignInUpForm.ts b/packages/twenty-front/src/modules/auth/sign-in-up/hooks/useSignInUpForm.ts index 07e2aaf7b1..d9596e6f4f 100644 --- a/packages/twenty-front/src/modules/auth/sign-in-up/hooks/useSignInUpForm.ts +++ b/packages/twenty-front/src/modules/auth/sign-in-up/hooks/useSignInUpForm.ts @@ -25,6 +25,9 @@ export const useSignInUpForm = () => { mode: 'onChange', defaultValues: { exist: false, + email: '', + password: '', + captchaToken: '', }, resolver: zodResolver(validationSchema), });