diff options
author | Ivan Chen <ivan@tagg.id> | 2021-03-25 16:17:48 -0400 |
---|---|---|
committer | Ivan Chen <ivan@tagg.id> | 2021-03-25 16:17:48 -0400 |
commit | 70c4baa05d13d36bc56e8647c13ba40701450504 (patch) | |
tree | 44813cdb94e5792743878e688421b0e320c0fada | |
parent | 3728df66381c77db8fe37032bbddb0a0aca79f2e (diff) |
added comments
-rw-r--r-- | src/screens/onboarding/Login.tsx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/screens/onboarding/Login.tsx b/src/screens/onboarding/Login.tsx index 64157e7b..a5713fc5 100644 --- a/src/screens/onboarding/Login.tsx +++ b/src/screens/onboarding/Login.tsx @@ -168,11 +168,21 @@ const Login: React.FC<LoginProps> = ({navigation}: LoginProps) => { Alert.alert(ERROR_INVALID_LOGIN); } } else if (statusCode === 200 && data.university === '') { + /** + * A user account was created during onboarding step 2 but user didn't + * finish step 3, thus does not have a universtiy. + * Redirecting user back to onboarding to finish the process + */ navigation.navigate('OnboardingStepThree', { userId: data.UserID, username: username, }); } else if (statusCode === 200 && !data.isOnboarded) { + /** + * A user account was created and finished the onboarding process but + * did not have an invitation code at the time so the user's account + * is not activated (isOnboarded) yet. + */ navigation.navigate('InvitationCodeVerification', { userId: data.UserID, username: username, |