aboutsummaryrefslogtreecommitdiff
path: root/src/screens/onboarding/RegistrationThree.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/screens/onboarding/RegistrationThree.tsx')
-rw-r--r--src/screens/onboarding/RegistrationThree.tsx17
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,