diff --git a/src/features/authentication/components/AuthenticationSteps/CompleteSignUp.tsx b/src/features/authentication/components/AuthenticationSteps/CompleteSignUp.tsx index 6ec07f3..6c75be4 100644 --- a/src/features/authentication/components/AuthenticationSteps/CompleteSignUp.tsx +++ b/src/features/authentication/components/AuthenticationSteps/CompleteSignUp.tsx @@ -67,6 +67,15 @@ export const CompleteSignUp = ({ } }; + const handleChange = (e: React.ChangeEvent) => { + let newValue = e.target.value; + if (newValue.startsWith('09')) { + newValue = newValue.substring(1); + } + + setValue(newValue); + }; + return ( ) => { - const newValue = event.target.value; + let newValue = event.target.value; + if (newValue.startsWith('09')) { + newValue = newValue.substring(1); + } + setLoginRegisterValue(newValue); // If the new value contains only digits (or is empty), it's a phone number diff --git a/src/features/authentication/components/ForgetPassword/ForgettedPasswordInfo.tsx b/src/features/authentication/components/ForgetPassword/ForgettedPasswordInfo.tsx index 6000dd8..0ab10ab 100644 --- a/src/features/authentication/components/ForgetPassword/ForgettedPasswordInfo.tsx +++ b/src/features/authentication/components/ForgetPassword/ForgettedPasswordInfo.tsx @@ -45,7 +45,10 @@ export function ForgettedPasswordInfo({ } = useApi(sendForgetPassCode); const handleInputChange = (event: React.ChangeEvent) => { - const newValue = event.target.value; + let newValue = event.target.value; + if (newValue.startsWith('09')) { + newValue = newValue.substring(1); + } setForgettedPasswordInfo(newValue); // If the new value contains only digits (or is empty), it's a phone number