From ab7fa09af967e0a8cf2ca53dfb24f8bc8a6886f7 Mon Sep 17 00:00:00 2001 From: Ashm Walia <40498934+ashmgarv@users.noreply.github.com> Date: Sun, 18 Oct 2020 16:37:32 -0700 Subject: [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 --- .../onboarding/InvitationCodeVerification.tsx | 27 +++++++++++----------- 1 file changed, 14 insertions(+), 13 deletions(-) (limited to 'src/screens/onboarding') 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 = ({ }); 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 = ({ 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 = ({ Enter the code - 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.)