From 70c4baa05d13d36bc56e8647c13ba40701450504 Mon Sep 17 00:00:00 2001 From: Ivan Chen Date: Thu, 25 Mar 2021 16:17:48 -0400 Subject: added comments --- src/screens/onboarding/Login.tsx | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src') 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 = ({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, -- cgit v1.2.3-70-g09d2