aboutsummaryrefslogtreecommitdiff
path: root/src/screens/onboarding/InvitationCodeVerification.tsx
diff options
context:
space:
mode:
authorAshm Walia <40498934+ashmgarv@users.noreply.github.com>2020-10-18 16:37:32 -0700
committerGitHub <noreply@github.com>2020-10-18 19:37:32 -0400
commitab7fa09af967e0a8cf2ca53dfb24f8bc8a6886f7 (patch)
tree898e7aa42529eda91964ac1a18aa1881689554f2 /src/screens/onboarding/InvitationCodeVerification.tsx
parent79d237f616c37940f5d476eb1dca6b5d05cf148a (diff)
[TMA 279] Ability to search and view someone's profile (#58)
* Batch one : major changes * WIP checkpoint * The one before the final touch * Probable final touch * ran yarn lint D: * linter broke something * fixed a small bug * Addressed a small nitpick * Well abstracted now Co-authored-by: Ivan Chen <ivan@thetaggid.com>
Diffstat (limited to 'src/screens/onboarding/InvitationCodeVerification.tsx')
-rw-r--r--src/screens/onboarding/InvitationCodeVerification.tsx27
1 files changed, 14 insertions, 13 deletions
diff --git a/src/screens/onboarding/InvitationCodeVerification.tsx b/src/screens/onboarding/InvitationCodeVerification.tsx
index fd5f828b..8a3d5982 100644
--- a/src/screens/onboarding/InvitationCodeVerification.tsx
+++ b/src/screens/onboarding/InvitationCodeVerification.tsx
@@ -10,7 +10,7 @@ import {
LoadingIndicator,
} from '../../components';
-import {VERIFY_INVITATION_CODE_ENDPOUNT} from "../../constants"
+import {VERIFY_INVITATION_CODE_ENDPOUNT} from '../../constants';
import {Text} from 'react-native-animatable';
import {
@@ -53,18 +53,19 @@ const InvitationCodeVerification: React.FC<InvitationCodeVerificationProps> = ({
});
const handleInvitationCodeVerification = async () => {
- if(value.length === 6){
- try {
- let verifyInviteCodeResponse = await fetch(VERIFY_INVITATION_CODE_ENDPOUNT + value + '/', {
- method: 'DELETE',
- });
+ if (value.length === 6) {
+ try {
+ let verifyInviteCodeResponse = await fetch(
+ VERIFY_INVITATION_CODE_ENDPOUNT + value + '/',
+ {
+ method: 'DELETE',
+ },
+ );
if (verifyInviteCodeResponse.status == 200) {
navigation.navigate('RegistrationOne');
} else {
- Alert.alert(
- 'Invalid invitation code 🤔',
- );
+ Alert.alert('Invalid invitation code 🤔');
}
} catch (error) {
Alert.alert(
@@ -76,9 +77,8 @@ const InvitationCodeVerification: React.FC<InvitationCodeVerificationProps> = ({
description: error,
};
}
- }
- else{
- Alert.alert("The code entered is not valid!");
+ } else {
+ Alert.alert('The code entered is not valid!');
}
};
@@ -97,7 +97,8 @@ const InvitationCodeVerification: React.FC<InvitationCodeVerificationProps> = ({
<KeyboardAvoidingView behavior="padding" style={styles.form}>
<Text style={styles.formHeader}>Enter the code</Text>
<Text style={styles.description}>
- Please enter the invitation code provided to you by us / your friend. (Use all caps.)
+ Please enter the invitation code provided to you by us / your friend.
+ (Use all caps.)
</Text>
<CodeField
ref={ref}