diff --git a/packages/atlas/src/components/_auth/SignUpModal/SignUpModal.tsx b/packages/atlas/src/components/_auth/SignUpModal/SignUpModal.tsx index e437c06ad0..8141fb7f48 100644 --- a/packages/atlas/src/components/_auth/SignUpModal/SignUpModal.tsx +++ b/packages/atlas/src/components/_auth/SignUpModal/SignUpModal.tsx @@ -203,8 +203,8 @@ export const SignUpModal = () => { ) const handlePasswordStepSubmit = useCallback( - async (password: string) => { - signUpFormData.current = { ...signUpFormData.current, password } + async (password: string, captchaToken?: string) => { + signUpFormData.current = { ...signUpFormData.current, password, captchaToken } const memberId = await createNewMember({ data: { ...signUpFormData.current, diff --git a/packages/atlas/src/components/_auth/SignUpModal/SignUpSteps/SignUpPasswordStep/SignUpPasswordStep.tsx b/packages/atlas/src/components/_auth/SignUpModal/SignUpSteps/SignUpPasswordStep/SignUpPasswordStep.tsx index f4cf86e3cc..3e736fc0bf 100644 --- a/packages/atlas/src/components/_auth/SignUpModal/SignUpSteps/SignUpPasswordStep/SignUpPasswordStep.tsx +++ b/packages/atlas/src/components/_auth/SignUpModal/SignUpSteps/SignUpPasswordStep/SignUpPasswordStep.tsx @@ -22,7 +22,7 @@ type PasswordStepForm = { } type SignUpPasswordStepProps = { - onPasswordSubmit: (password: string) => void + onPasswordSubmit: (password: string, captchaToken?: string) => void password?: string dialogContentRef?: RefObject } & SignUpStepsCommonProps & @@ -58,10 +58,10 @@ export const SignUpPasswordStep: FC = ({ const captchaInputRef = useRef(null) const handleGoToNextStep = useCallback(() => { - captchaRef.current?.resetCaptcha() handleSubmit((data) => { - onPasswordSubmit(data.password) + onPasswordSubmit(data.password, data.captchaToken) })() + captchaRef.current?.resetCaptcha() }, [handleSubmit, onPasswordSubmit]) useEffect(() => {