diff options
author | Ivan Chen <ivan@tagg.id> | 2021-03-30 14:11:35 -0400 |
---|---|---|
committer | Ivan Chen <ivan@tagg.id> | 2021-03-30 14:11:35 -0400 |
commit | 52bec30cbae29f165eec99179af52a59b6ef4db8 (patch) | |
tree | 2fb1964a0b5d754bc136a0fd9a60f70bebe60a3d /src | |
parent | a168fc7635c4d40365d095a476348e09ebbb1db9 (diff) |
passing username properly
Diffstat (limited to 'src')
-rw-r--r-- | src/screens/onboarding/InvitationCodeVerification.tsx | 2 | ||||
-rw-r--r-- | src/screens/onboarding/OnboardingStepThree.tsx | 3 | ||||
-rw-r--r-- | src/screens/onboarding/OnboardingStepTwo.tsx | 2 |
3 files changed, 3 insertions, 4 deletions
diff --git a/src/screens/onboarding/InvitationCodeVerification.tsx b/src/screens/onboarding/InvitationCodeVerification.tsx index 7cd4b3bf..adaf6fe5 100644 --- a/src/screens/onboarding/InvitationCodeVerification.tsx +++ b/src/screens/onboarding/InvitationCodeVerification.tsx @@ -23,7 +23,6 @@ import { ERROR_INVALID_INVITATION_CODE, ERROR_INVLAID_CODE, ERROR_VERIFICATION_FAILED_SHORT, - SUCCESS_INVITATION_CODE, } from '../../constants/strings'; import {OnboardingStackParams} from '../../routes'; import {BackgroundGradientType} from '../../types'; @@ -83,6 +82,7 @@ const InvitationCodeVerification: React.FC<InvitationCodeVerificationProps> = ({ Alert.alert(ERROR_INVALID_INVITATION_CODE); } } catch (error) { + console.log(error); Alert.alert( ERROR_VERIFICATION_FAILED_SHORT, ERROR_DOUBLE_CHECK_CONNECTION, diff --git a/src/screens/onboarding/OnboardingStepThree.tsx b/src/screens/onboarding/OnboardingStepThree.tsx index 29028421..53dd8b1f 100644 --- a/src/screens/onboarding/OnboardingStepThree.tsx +++ b/src/screens/onboarding/OnboardingStepThree.tsx @@ -216,8 +216,7 @@ const OnboardingStepThree: React.FC<OnboardingStepThreeProps> = ({ patchEditProfile(request, userId) .then((_) => navigation.navigate('InvitationCodeVerification', { - userId: route.params.userId, - username: username, + ...route.params, }), ) .catch((error) => { diff --git a/src/screens/onboarding/OnboardingStepTwo.tsx b/src/screens/onboarding/OnboardingStepTwo.tsx index a1100827..9bb27f8a 100644 --- a/src/screens/onboarding/OnboardingStepTwo.tsx +++ b/src/screens/onboarding/OnboardingStepTwo.tsx @@ -170,7 +170,7 @@ const OnboardingStepTwo: React.FC<OnboardingStepTwoProps> = ({ ); if (response) { const data = await response.json(); - const {token, UserID, username} = data; + const {token, UserID} = data; switch (response.status) { case 201: await AsyncStorage.setItem('token', token); |