From 9191ea31fa0fda9a7f7a158f6ac4908f07e1ad62 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: Tue, 29 Jul 2025 16:51:20 +0330 Subject: [PATCH] chore: authentication container changed to auth steps --- .../AuthenticationSteps.tsx} | 4 ++-- .../components/{ => AuthenticationSteps}/CompleteSignUp.tsx | 2 +- .../{ => AuthenticationSteps}/CountryCodeSelector.tsx | 2 +- .../{ => AuthenticationSteps}/EnterPasswordForm.tsx | 2 +- .../components/{ => AuthenticationSteps}/LoginRegiserForm.tsx | 4 ++-- .../components/{ => AuthenticationSteps}/OtpVerifyForm.tsx | 4 ++-- src/features/authentication/routes/AuthenticationPage.tsx | 4 ++-- 7 files changed, 11 insertions(+), 11 deletions(-) rename src/features/authentication/components/{AuthenticationContainer.tsx => AuthenticationSteps/AuthenticationSteps.tsx} (96%) rename src/features/authentication/components/{ => AuthenticationSteps}/CompleteSignUp.tsx (98%) rename src/features/authentication/components/{ => AuthenticationSteps}/CountryCodeSelector.tsx (99%) rename src/features/authentication/components/{ => AuthenticationSteps}/EnterPasswordForm.tsx (98%) rename src/features/authentication/components/{ => AuthenticationSteps}/LoginRegiserForm.tsx (97%) rename src/features/authentication/components/{ => AuthenticationSteps}/OtpVerifyForm.tsx (97%) diff --git a/src/features/authentication/components/AuthenticationContainer.tsx b/src/features/authentication/components/AuthenticationSteps/AuthenticationSteps.tsx similarity index 96% rename from src/features/authentication/components/AuthenticationContainer.tsx rename to src/features/authentication/components/AuthenticationSteps/AuthenticationSteps.tsx index 67a98e4..b88a506 100644 --- a/src/features/authentication/components/AuthenticationContainer.tsx +++ b/src/features/authentication/components/AuthenticationSteps/AuthenticationSteps.tsx @@ -1,12 +1,12 @@ import React, { useState, type JSX } from 'react'; import { LoginRegisterForm } from './LoginRegiserForm'; -import type { AuthMode, AuthType } from '../types/auth-types'; +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 => { +export const AuthenticationSteps = (): JSX.Element => { const [authMode, setAuthMode] = useState('register'); const [authType, setAuthType] = useState('phone'); const [currentStep, setCurrentStep] = useState< diff --git a/src/features/authentication/components/CompleteSignUp.tsx b/src/features/authentication/components/AuthenticationSteps/CompleteSignUp.tsx similarity index 98% rename from src/features/authentication/components/CompleteSignUp.tsx rename to src/features/authentication/components/AuthenticationSteps/CompleteSignUp.tsx index 098396b..bdd2f7d 100644 --- a/src/features/authentication/components/CompleteSignUp.tsx +++ b/src/features/authentication/components/AuthenticationSteps/CompleteSignUp.tsx @@ -3,7 +3,7 @@ import parsePhoneNumberFromString from 'libphonenumber-js'; import React, { useRef, useState, type Dispatch } from 'react'; import { useTranslation } from 'react-i18next'; import { CountryCodeSelector } from './CountryCodeSelector'; -import { AuthenticationCard } from './AuthenticationCard'; +import { AuthenticationCard } from '../AuthenticationCard'; export interface CompleteSignUpProps { email: string; diff --git a/src/features/authentication/components/CountryCodeSelector.tsx b/src/features/authentication/components/AuthenticationSteps/CountryCodeSelector.tsx similarity index 99% rename from src/features/authentication/components/CountryCodeSelector.tsx rename to src/features/authentication/components/AuthenticationSteps/CountryCodeSelector.tsx index 6028d6b..dde39a4 100644 --- a/src/features/authentication/components/CountryCodeSelector.tsx +++ b/src/features/authentication/components/AuthenticationSteps/CountryCodeSelector.tsx @@ -10,7 +10,7 @@ import { Typography, } from '@mui/material'; import { useMemo, useRef, useState, type RefObject } from 'react'; -import { countries, type Country } from '../data/countries'; +import { countries, type Country } from '../../data/countries'; import { ArrowDown2 } from 'iconsax-reactjs'; import ReactCountryFlag from 'react-country-flag'; import { useTranslation } from 'react-i18next'; diff --git a/src/features/authentication/components/EnterPasswordForm.tsx b/src/features/authentication/components/AuthenticationSteps/EnterPasswordForm.tsx similarity index 98% rename from src/features/authentication/components/EnterPasswordForm.tsx rename to src/features/authentication/components/AuthenticationSteps/EnterPasswordForm.tsx index 5414a66..579a551 100644 --- a/src/features/authentication/components/EnterPasswordForm.tsx +++ b/src/features/authentication/components/AuthenticationSteps/EnterPasswordForm.tsx @@ -1,5 +1,5 @@ import React, { useRef, useState } from 'react'; -import { AuthenticationCard } from './AuthenticationCard'; +import { AuthenticationCard } from '../AuthenticationCard'; import { ArrowLeft, Edit2, Eye, EyeSlash, MaskLeft } from 'iconsax-reactjs'; import { Box, diff --git a/src/features/authentication/components/LoginRegiserForm.tsx b/src/features/authentication/components/AuthenticationSteps/LoginRegiserForm.tsx similarity index 97% rename from src/features/authentication/components/LoginRegiserForm.tsx rename to src/features/authentication/components/AuthenticationSteps/LoginRegiserForm.tsx index a851d14..1c28e08 100644 --- a/src/features/authentication/components/LoginRegiserForm.tsx +++ b/src/features/authentication/components/AuthenticationSteps/LoginRegiserForm.tsx @@ -11,10 +11,10 @@ import { useTranslation } from 'react-i18next'; import { CountryCodeSelector } from './CountryCodeSelector'; import { Google } from 'iconsax-reactjs'; import { isNumeric } from '@/utils/regexes/isNumeric'; -import type { AuthMode, AuthType } from '../types/auth-types'; +import type { AuthMode, AuthType } from '../../types/auth-types'; import { isEmail } from '@/utils/regexes/isEmail'; import parsePhoneNumberFromString from 'libphonenumber-js'; -import { AuthenticationCard } from './AuthenticationCard'; +import { AuthenticationCard } from '../AuthenticationCard'; export interface LoginRegisterFormProps { loginRegisterValue: string; diff --git a/src/features/authentication/components/OtpVerifyForm.tsx b/src/features/authentication/components/AuthenticationSteps/OtpVerifyForm.tsx similarity index 97% rename from src/features/authentication/components/OtpVerifyForm.tsx rename to src/features/authentication/components/AuthenticationSteps/OtpVerifyForm.tsx index f958bfc..1997972 100644 --- a/src/features/authentication/components/OtpVerifyForm.tsx +++ b/src/features/authentication/components/AuthenticationSteps/OtpVerifyForm.tsx @@ -2,10 +2,10 @@ import { useTranslation } from 'react-i18next'; import { Alert, Box, Button, Snackbar, Stack, Typography } from '@mui/material'; import { Edit2 } from 'iconsax-reactjs'; import DigitInput from '@/components/components/DigitsInput'; -import type { AuthMode, AuthType } from '../types/auth-types'; +import type { AuthMode, AuthType } from '../../types/auth-types'; import { useEffect, useState } from 'react'; import { Toast } from '@/components/Toast'; -import { AuthenticationCard } from './AuthenticationCard'; +import { AuthenticationCard } from '../AuthenticationCard'; interface OtpVerifyFormProps { value: string; diff --git a/src/features/authentication/routes/AuthenticationPage.tsx b/src/features/authentication/routes/AuthenticationPage.tsx index b23f6c5..7cad998 100644 --- a/src/features/authentication/routes/AuthenticationPage.tsx +++ b/src/features/authentication/routes/AuthenticationPage.tsx @@ -2,7 +2,7 @@ import { FlexBox } from '@/components/components/common/FlexBox'; import Logo from '@/components/Logo'; import { Paper } from '@mui/material'; import { useState } from 'react'; -import { AuthenticationContainer } from '../components/AuthenticationContainer'; +import { AuthenticationSteps } from '../components/AuthenticationSteps/AuthenticationSteps'; export function AuthenticationPage() { return ( @@ -16,7 +16,7 @@ export function AuthenticationPage() { }} > - + ); }