diff options
| author | Ashm Walia <40498934+ashmgarv@users.noreply.github.com> | 2020-10-13 10:24:59 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-13 13:24:59 -0400 |
| commit | 854a7d8f8526e8142c416ec41682468e87bcbbd2 (patch) | |
| tree | 80493f0e697cc1b6d93e960fa2a0a6d5a4a91e95 /src/screens/onboarding/Verification.tsx | |
| parent | 6e3fe33e5e1d3818ef8bb942c1544581ab8c0688 (diff) | |
[TMA - 238] Added invitation code verification screen as the first onboarding screen (#46)
* Added invitation code verification screen as the first onboarding screen
* Changed screen order on some screens and a quick check on back navigation
Diffstat (limited to 'src/screens/onboarding/Verification.tsx')
| -rw-r--r-- | src/screens/onboarding/Verification.tsx | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/src/screens/onboarding/Verification.tsx b/src/screens/onboarding/Verification.tsx index 89f79ac8..91e6b181 100644 --- a/src/screens/onboarding/Verification.tsx +++ b/src/screens/onboarding/Verification.tsx @@ -8,6 +8,7 @@ import { RegistrationWizard, SubmitButton, ArrowButton, + LoadingIndicator, } from '../../components'; import {VERIFY_OTP_ENDPOINT, SEND_OTP_ENDPOINT} from '../../constants'; import {Text} from 'react-native-animatable'; @@ -23,10 +24,9 @@ import { TouchableOpacity, KeyboardAvoidingView, Alert, - ActivityIndicator, Platform, } from 'react-native'; -import {usePromiseTracker, trackPromise} from 'react-promise-tracker'; +import {trackPromise} from 'react-promise-tracker'; type VerificationScreenRouteProp = RouteProp< OnboardingStackParams, @@ -64,7 +64,7 @@ const Verification: React.FC<VerificationProps> = ({route, navigation}) => { }), }); let statusCode = verifyOtpResponse.status; - if (statusCode == 200) { + if (statusCode === 200) { navigation.navigate('RegistrationTwo', { email: email, }); @@ -114,22 +114,6 @@ const Verification: React.FC<VerificationProps> = ({route, navigation}) => { } }; - /** - * An activity indicator to indicate that the app is working during the verify_otp request. - */ - const LoadingIndicator = () => { - const {promiseInProgress} = usePromiseTracker(); - return promiseInProgress ? ( - <ActivityIndicator - style={styles.loadingIndicator} - size="large" - color="#fff" - /> - ) : ( - <></> - ); - }; - const Footer = () => ( <View style={styles.footer}> <ArrowButton @@ -141,7 +125,7 @@ const Verification: React.FC<VerificationProps> = ({route, navigation}) => { return ( <Background centered style={styles.container}> - <RegistrationWizard style={styles.wizard} step="two" /> + <RegistrationWizard style={styles.wizard} step="three" /> <KeyboardAvoidingView behavior="padding" style={styles.form}> <Text style={styles.formHeader}>Enter 6 digit code</Text> <Text style={styles.description}> |
