diff options
author | Ivan Chen <ivan@tagg.id> | 2021-01-11 16:11:11 -0500 |
---|---|---|
committer | Ivan Chen <ivan@tagg.id> | 2021-01-15 14:19:50 -0500 |
commit | 080e76350c2570eeb096fad40fe95f1b766b4539 (patch) | |
tree | bcb9f73f2c192f8c34f2064a5c3fd003756c2823 /src/screens/onboarding/InvitationCodeVerification.tsx | |
parent | 1dccfb1d3e9470d81de8d1ec0a0dbb3803372f7d (diff) |
created strings.ts and linting
Diffstat (limited to 'src/screens/onboarding/InvitationCodeVerification.tsx')
-rw-r--r-- | src/screens/onboarding/InvitationCodeVerification.tsx | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/screens/onboarding/InvitationCodeVerification.tsx b/src/screens/onboarding/InvitationCodeVerification.tsx index cc7cd678..875523d3 100644 --- a/src/screens/onboarding/InvitationCodeVerification.tsx +++ b/src/screens/onboarding/InvitationCodeVerification.tsx @@ -31,6 +31,12 @@ import { } from 'react-native'; import {BackgroundGradientType} from '../../types'; +import { + ERROR_DOUBLE_CHECK_CONNECTION, + ERROR_INVALID_INVITATION_CODE, + ERROR_INVLAID_CODE, + ERROR_VERIFICATION_FAILED, +} from '../../constants/strings'; type InvitationCodeVerificationScreenNavigationProp = StackNavigationProp< OnboardingStackParams, @@ -66,23 +72,20 @@ const InvitationCodeVerification: React.FC<InvitationCodeVerificationProps> = ({ }, ); - if (verifyInviteCodeResponse.status == 200) { + if (verifyInviteCodeResponse.status === 200) { navigation.navigate('RegistrationOne'); } else { - Alert.alert('Invalid invitation code 🤔'); + Alert.alert(ERROR_INVALID_INVITATION_CODE); } } catch (error) { - Alert.alert( - 'Verifiation failed 😓', - 'Please double-check your network connection and retry.', - ); + Alert.alert(ERROR_VERIFICATION_FAILED, ERROR_DOUBLE_CHECK_CONNECTION); return { name: 'Verification error', description: error, }; } } else { - Alert.alert('The code entered is not valid!'); + Alert.alert(ERROR_INVLAID_CODE); } }; |