diff options
| author | George Rusu <56009869+grusu6928@users.noreply.github.com> | 2020-10-27 12:13:13 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-27 15:13:13 -0400 |
| commit | 9c7a867c1851914322a4b60f20223ae06a31c661 (patch) | |
| tree | 7e8a70b2c5e5654240362146d76727991fd1ca97 /src/screens/onboarding/Verification.tsx | |
| parent | e7a712038a17a759d09bf80c6945c89e060f7310 (diff) | |
[TMA263] Added Phone Verification UI (#74)
* [TMA263] Added Phone Verification UI
* include email field
Co-authored-by: george <grus6928@gmail.com>
Co-authored-by: hsalhab <husam_salhab@brown.edu>
Diffstat (limited to 'src/screens/onboarding/Verification.tsx')
| -rw-r--r-- | src/screens/onboarding/Verification.tsx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/screens/onboarding/Verification.tsx b/src/screens/onboarding/Verification.tsx index 91e6b181..228cb778 100644 --- a/src/screens/onboarding/Verification.tsx +++ b/src/screens/onboarding/Verification.tsx @@ -48,7 +48,7 @@ const Verification: React.FC<VerificationProps> = ({route, navigation}) => { value, setValue, }); - const {email} = route.params; + const {phone} = route.params; /** * Sends the verify_otp request upon tapping the Verify button. @@ -59,14 +59,14 @@ const Verification: React.FC<VerificationProps> = ({route, navigation}) => { let verifyOtpResponse = await fetch(VERIFY_OTP_ENDPOINT, { method: 'POST', body: JSON.stringify({ - email: email, + phone_number: phone, otp: value, }), }); let statusCode = verifyOtpResponse.status; if (statusCode === 200) { navigation.navigate('RegistrationTwo', { - email: email, + phone: phone, }); } else { Alert.alert( @@ -95,7 +95,7 @@ const Verification: React.FC<VerificationProps> = ({route, navigation}) => { fetch(SEND_OTP_ENDPOINT, { method: 'POST', body: JSON.stringify({ - email: email, + phone: phone, }), }), ); @@ -104,7 +104,7 @@ const Verification: React.FC<VerificationProps> = ({route, navigation}) => { setValue(''); Alert.alert( 'New verification code sent!', - 'Check your email for your code.', + 'Check your phone messages for your code.', ); } else { Alert.alert('Something went wrong!'); @@ -129,7 +129,7 @@ const Verification: React.FC<VerificationProps> = ({route, navigation}) => { <KeyboardAvoidingView behavior="padding" style={styles.form}> <Text style={styles.formHeader}>Enter 6 digit code</Text> <Text style={styles.description}> - We sent a 6 digit verification code to the email you provided. + We sent a 6 digit verification code to the phone number you provided. </Text> <CodeField ref={ref} @@ -156,7 +156,7 @@ const Verification: React.FC<VerificationProps> = ({route, navigation}) => { color="#fff" style={styles.button} accessibilityLabel="Verify" - accessibilityHint="Select this after entering your email verification code" + accessibilityHint="Select this after entering your phone number verification code" onPress={handleVerification} /> <TouchableOpacity onPress={handleResend}> |
