fix: zero remove for password reset

This commit is contained in:
2025-09-06 15:52:38 +03:30
parent cedce99986
commit 6385a543b5

View File

@@ -45,7 +45,10 @@ export function ForgettedPasswordInfo({
} = useApi(sendForgetPassCode);
const handleInputChange = (event: React.ChangeEvent<HTMLInputElement>) => {
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