From 51d940e5d90d1f3ef0e94eeeb065a681d68d4973 Mon Sep 17 00:00:00 2001 From: George Rusu Date: Mon, 10 May 2021 11:14:56 -0700 Subject: previous onboarding steps display submitted entries --- src/screens/onboarding/BasicInfoOnboarding.tsx | 111 ++++++++++++++----------- 1 file changed, 64 insertions(+), 47 deletions(-) (limited to 'src') diff --git a/src/screens/onboarding/BasicInfoOnboarding.tsx b/src/screens/onboarding/BasicInfoOnboarding.tsx index 1e3522bd..8ddb74e1 100644 --- a/src/screens/onboarding/BasicInfoOnboarding.tsx +++ b/src/screens/onboarding/BasicInfoOnboarding.tsx @@ -208,31 +208,38 @@ const BasicInfoOnboarding: React.FC = ({route}) => { }; const formSteps: { placeholder: string; - onChangeText: (text: string) => void; + onChangeText: (text: string) => void; + value: string; }[] = [ { placeholder: 'First Name', onChangeText: (text) => handleNameUpdate(text, 0), + value: form.fname }, { placeholder: 'Last Name', onChangeText: (text) => handleNameUpdate(text, 1), + value: form.lname }, { placeholder: 'Phone', onChangeText: handlePhoneUpdate, + value: form.phone }, { placeholder: 'School Email', onChangeText: handleEmailUpdate, + value: form.email }, { placeholder: 'Username', onChangeText: (text) => handleNameUpdate(text, 2), + value: form.username }, { placeholder: 'Password', onChangeText: handlePasswordUpdate, + value: form.password }, ]; const resetForm = (formStep: String) => { @@ -421,6 +428,7 @@ const BasicInfoOnboarding: React.FC = ({route}) => { returnKeyType="done" selectionColor="white" onChangeText={step.onChangeText} + value={step.value} onSubmitEditing={advance} autoFocus={true} blurOnSubmit={false} @@ -443,52 +451,61 @@ const BasicInfoOnboarding: React.FC = ({route}) => { ) : ( - <>SIGN UP - - - setPassVisibility(!passVisibility)}> - Show Password - - - - - - - + <> + SIGN UP + + + setPassVisibility(!passVisibility)}> + Show Password + + + + + + + + )} )} -- cgit v1.2.3-70-g09d2