chore: add phone number logic changed

This commit is contained in:
مهرزاد قدرتی
2025-08-12 11:52:09 +03:30
parent b8f7221780
commit e4755ded73
3 changed files with 28 additions and 41 deletions

View File

@@ -69,6 +69,16 @@ export const AuthenticationSteps = (): JSX.Element => {
location.href = authReturnUrl;
};
const handleConfrimPhoneNumber = (userId: GUID) => {
handleUserLoggedIn(userId);
setCurrentStep('addPhoneNumber');
};
const handlePhoneNumberVerified = () => {
location.href = authReturnUrl;
};
return (
<>
{currentStep === 'emailOrPhone' && (
@@ -87,7 +97,7 @@ export const AuthenticationSteps = (): JSX.Element => {
{currentStep === 'verify' && (
<OtpVerifyForm
onVerifyPhoneNumber={() => setCurrentStep('addPhoneNumber')}
onVerifyPhoneNumber={handleConfrimPhoneNumber}
authReturnUrl={authReturnUrl}
countryCode={countryCode}
onOTPVerified={handleOTPVerfied}
@@ -129,7 +139,7 @@ export const AuthenticationSteps = (): JSX.Element => {
onEditValue={() => setCurrentStep('addPhoneNumber')}
value={addedPhoneNumberValue}
email={loginRegisterValue}
onPhoneNumberVerified={handleUserLoggedIn}
onPhoneNumberVerified={handlePhoneNumberVerified}
/>
)}
</>