From ab223af15b37106f87baa112c9232bf6c73c48c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D9=85=D9=87=D8=B1=D8=B2=D8=A7=D8=AF=20=D9=82=D8=AF=D8=B1?= =?UTF-8?q?=D8=AA=DB=8C?= Date: Mon, 28 Jul 2025 16:43:57 +0330 Subject: [PATCH] chore: EnterPasswordForm component created --- .../components/AuthenticationContainer.tsx | 11 +++++++++-- .../components/EnterPasswordForm.tsx | 14 ++++++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 src/features/authentication/components/EnterPasswordForm.tsx diff --git a/src/features/authentication/components/AuthenticationContainer.tsx b/src/features/authentication/components/AuthenticationContainer.tsx index ed1f8c8..fc2055f 100644 --- a/src/features/authentication/components/AuthenticationContainer.tsx +++ b/src/features/authentication/components/AuthenticationContainer.tsx @@ -4,6 +4,7 @@ import type { AuthMode, AuthType } from '../types/auth-types'; import { OtpVerifyForm } from './OtpVerifyForm'; import { isNumeric } from '@/utils/regexes/isNumeric'; import { CompleteSignUp } from './CompleteSignUp'; +import { EnterPasswordForm } from './EnterPasswordForm'; export const AuthenticationContainer = (): JSX.Element => { const [authMode, setAuthMode] = useState('register'); @@ -27,7 +28,6 @@ export const AuthenticationContainer = (): JSX.Element => { const handleOTPVerfied = (otpCode: string) => { if (authMode === 'register' && authType === 'email') { - setAuthType('phone'); setCurrentStep('addPhoneNumber'); } }; @@ -70,6 +70,13 @@ export const AuthenticationContainer = (): JSX.Element => { /> )} + {currentStep === 'enterPassword' && ( + {}} + emailOrPhone={loginRegisterValue} + /> + )} + {currentStep === 'addPhoneNumber' && ( { diff --git a/src/features/authentication/components/EnterPasswordForm.tsx b/src/features/authentication/components/EnterPasswordForm.tsx new file mode 100644 index 0000000..72ce370 --- /dev/null +++ b/src/features/authentication/components/EnterPasswordForm.tsx @@ -0,0 +1,14 @@ +import React from 'react'; +import { AuthenticationCard } from './AuthenticationCard'; + +export interface EnterPasswordFormProps { + onLoginWithPassword: () => void; + emailOrPhone: string; +} + +export const EnterPasswordForm = ({ + onLoginWithPassword, + emailOrPhone, +}: EnterPasswordFormProps) => { + return ; +};