aboutsummaryrefslogtreecommitdiff
path: root/src/screens/onboarding/RegistrationThree.tsx
diff options
context:
space:
mode:
authorGeorge Rusu <56009869+grusu6928@users.noreply.github.com>2020-10-27 12:13:13 -0700
committerGitHub <noreply@github.com>2020-10-27 15:13:13 -0400
commit9c7a867c1851914322a4b60f20223ae06a31c661 (patch)
tree7e8a70b2c5e5654240362146d76727991fd1ca97 /src/screens/onboarding/RegistrationThree.tsx
parente7a712038a17a759d09bf80c6945c89e060f7310 (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/RegistrationThree.tsx')
-rw-r--r--src/screens/onboarding/RegistrationThree.tsx9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/screens/onboarding/RegistrationThree.tsx b/src/screens/onboarding/RegistrationThree.tsx
index fd742728..1e1b48d4 100644
--- a/src/screens/onboarding/RegistrationThree.tsx
+++ b/src/screens/onboarding/RegistrationThree.tsx
@@ -58,7 +58,9 @@ const RegistrationThree: React.FC<RegistrationThreeProps> = ({
const registrationName = route.params;
const fname: string = registrationName!.firstName;
const lname: string = registrationName!.lastName;
+ const phone: string = registrationName!.phone;
const email: string = registrationName!.email;
+
/**
* Handles focus change to the next input field.
* @param field key for field to move focus onto
@@ -84,11 +86,11 @@ const RegistrationThree: React.FC<RegistrationThreeProps> = ({
// registration form state
const [form, setForm] = useState({
- email: '',
+ phone: '',
username: '',
password: '',
confirm: '',
- isValidEmail: false,
+ isValidPhone: false,
isValidUsername: false,
isValidPassword: false,
passwordsMatch: false,
@@ -163,6 +165,7 @@ const RegistrationThree: React.FC<RegistrationThreeProps> = ({
first_name: fname,
last_name: lname,
email: email,
+ phone_number: phone,
username: form.username,
password: form.password,
}),
@@ -218,7 +221,7 @@ const RegistrationThree: React.FC<RegistrationThreeProps> = ({
<View style={styles.footer}>
<ArrowButton
direction="backward"
- onPress={() => navigation.navigate('RegistrationTwo', {email: email})}
+ onPress={() => navigation.navigate('RegistrationTwo', {phone: phone})}
/>
<TouchableOpacity onPress={handleRegister}>
<ArrowButton