aboutsummaryrefslogtreecommitdiff
path: root/src/screens/onboarding/InvitationCodeVerification.tsx
diff options
context:
space:
mode:
authorIvan Chen <ivan@thetaggid.com>2021-01-15 19:27:03 -0500
committerGitHub <noreply@github.com>2021-01-15 19:27:03 -0500
commit1803da7388902db45ad37fbac509604ae632bdb5 (patch)
treea786919f9bc42f7797367d55ed8f1e099134f368 /src/screens/onboarding/InvitationCodeVerification.tsx
parent4d9efafeb4243e20e1fc936c27b9055c7ec82f8a (diff)
parentcc52dabaaf529763e9c1c4683ba94ed55c5671a8 (diff)
Merge pull request #176 from IvanIFChen/tma498-update-error-strings
[TMA-498] Update Error Strings
Diffstat (limited to 'src/screens/onboarding/InvitationCodeVerification.tsx')
-rw-r--r--src/screens/onboarding/InvitationCodeVerification.tsx17
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);
}
};