diff options
author | Ashm Walia <40498934+ashmgarv@users.noreply.github.com> | 2021-01-16 09:51:36 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-16 09:51:36 -0800 |
commit | 9711093bfa5810868e3cd17008bb7b3ddc7b9034 (patch) | |
tree | 6a8bb4341b1623cfc2da86af4b3b28c1fd3f8a44 /src/screens/onboarding/InvitationCodeVerification.tsx | |
parent | d85eaeb878cbbeedda860ee5809b81100c910af2 (diff) | |
parent | 30391867438bb28cbcba9fc9ee2ff6d00027fd86 (diff) |
Merge branch 'master' into tma538-friend-requests
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..903a9912 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_SHORT, +} 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_SHORT, ERROR_DOUBLE_CHECK_CONNECTION); return { name: 'Verification error', description: error, }; } } else { - Alert.alert('The code entered is not valid!'); + Alert.alert(ERROR_INVLAID_CODE); } }; |