-
-
Notifications
You must be signed in to change notification settings - Fork 25
250925-MOBILE-fix add phone number section #9706
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
250925-MOBILE-fix add phone number section #9706
Conversation
…fix/add-phone-number-section
…fix/add-phone-number-section
…fix/add-phone-number-section
…fix/add-phone-number-section
…fix/add-phone-number-section
if (route.params?.email) { | ||
resp = await confirmEmailOTP({ otp_code: otpConfirm, req_id: reqIdSent }); | ||
} else { | ||
// todo: add more logic |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add logic confirm OTP login phone
|
||
return ( | ||
<View style={styles.dropdownContainer}> | ||
{countries.length > 0 && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove countries.length > 0
const OTP_LENGTH = 6; | ||
|
||
export const OTPInput = memo(({ onOtpChange, onOtpComplete }: IOTPInputProps) => { | ||
const { SmsUserConsent } = NativeModules; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
define outside component
const checkValidPhoneNumber = useCallback((phoneNum: string) => { | ||
if (phoneNum.length === 0) return null; | ||
if (phoneNum.length < 7) return false; | ||
return /^\d+$/.test(phoneNum); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check phone regex
issue: #9525