chore: auth factory

This commit is contained in:
2025-08-25 23:42:29 +03:30
parent ad88aa893f
commit d1cadad183
4 changed files with 69 additions and 25 deletions

View File

@@ -2,7 +2,7 @@ import { Button, Stack, TextField, Typography } from '@mui/material';
import { useRef, useState, type Dispatch } from 'react';
import { useTranslation } from 'react-i18next';
import { isNumeric } from '@/utils/regexes/isNumeric';
import type { AuthType } from '../../types/authTypes';
import type { AuthFactory, AuthType } from '../../types/authTypes';
import { isEmail } from '@/utils/regexes/isEmail';
import { AuthenticationCard } from '../AuthenticationCard';
import { CountryCodeSelector } from '../CountryCodeSelector';
@@ -22,8 +22,8 @@ export interface LoginRegisterFormProps {
authType: AuthType;
setAuthType: Dispatch<AuthType>;
onLoginRegisterSubmit: (value: string, userStatus: UserStatus) => void;
authReturnUrl: string;
onGoogleAuthenticated: (loginResult: LoginResult) => void;
authFactory: AuthFactory;
}
export function LoginRegisterForm({
@@ -34,8 +34,8 @@ export function LoginRegisterForm({
authType,
setAuthType,
onLoginRegisterSubmit,
authReturnUrl,
onGoogleAuthenticated,
authFactory,
}: LoginRegisterFormProps) {
const { t } = useTranslation('authentication');
const textFieldRef = useRef<HTMLDivElement>(null);