diff options
| author | Ivan Chen <ivan@thetaggid.com> | 2021-01-15 19:27:03 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-15 19:27:03 -0500 |
| commit | 1803da7388902db45ad37fbac509604ae632bdb5 (patch) | |
| tree | a786919f9bc42f7797367d55ed8f1e099134f368 /src/screens/onboarding/RegistrationThree.tsx | |
| parent | 4d9efafeb4243e20e1fc936c27b9055c7ec82f8a (diff) | |
| parent | cc52dabaaf529763e9c1c4683ba94ed55c5671a8 (diff) | |
Merge pull request #176 from IvanIFChen/tma498-update-error-strings
[TMA-498] Update Error Strings
Diffstat (limited to 'src/screens/onboarding/RegistrationThree.tsx')
| -rw-r--r-- | src/screens/onboarding/RegistrationThree.tsx | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/screens/onboarding/RegistrationThree.tsx b/src/screens/onboarding/RegistrationThree.tsx index 52a6de84..03348e6b 100644 --- a/src/screens/onboarding/RegistrationThree.tsx +++ b/src/screens/onboarding/RegistrationThree.tsx @@ -30,6 +30,11 @@ import { import {passwordRegex, usernameRegex, REGISTER_ENDPOINT} from '../../constants'; import AsyncStorage from '@react-native-community/async-storage'; import {BackgroundGradientType} from '../../types'; +import { + ERROR_DOUBLE_CHECK_CONNECTION, + ERROR_REGISTRATION, + ERROR_SOMETHING_WENT_WRONG_REFRESH, +} from '../../constants/strings'; type RegistrationScreenThreeRouteProp = RouteProp< OnboardingStackParams, @@ -189,12 +194,9 @@ const RegistrationThree: React.FC<RegistrationThreeProps> = ({ console.log(err); } } else if (statusCode === 409) { - Alert.alert('Registration failed 😔', `${data}`); + Alert.alert(ERROR_REGISTRATION(data)); } else { - Alert.alert( - 'Something went wrong! ðŸ˜', - "Would you believe me if I told you that I don't know what happened?", - ); + Alert.alert(ERROR_SOMETHING_WENT_WRONG_REFRESH); } } else { Alert.alert( @@ -207,10 +209,7 @@ const RegistrationThree: React.FC<RegistrationThreeProps> = ({ setTimeout(() => setForm({...form, attemptedSubmit: true})); } } catch (error) { - Alert.alert( - 'Registration failed 😓', - 'Please double-check your network connection and retry.', - ); + Alert.alert(ERROR_REGISTRATION(ERROR_DOUBLE_CHECK_CONNECTION)); return { name: 'Registration error', description: error, |
