From e7a712038a17a759d09bf80c6945c89e060f7310 Mon Sep 17 00:00:00 2001 From: Shravya Ramesh <37447613+shravyaramesh@users.noreply.github.com> Date: Tue, 27 Oct 2020 09:38:18 -0700 Subject: [TMA-313] Removed Checkpoint while Onboarding (#76) * Redirecting to ProfilOnboarding page directly without going through the checkpoint page after registration * Made picture uploads mandatory --- src/screens/onboarding/ProfileOnboarding.tsx | 8 ++++++++ src/screens/onboarding/RegistrationThree.tsx | 6 +++++- 2 files changed, 13 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/screens/onboarding/ProfileOnboarding.tsx b/src/screens/onboarding/ProfileOnboarding.tsx index 7e489d6d..e7fcec90 100644 --- a/src/screens/onboarding/ProfileOnboarding.tsx +++ b/src/screens/onboarding/ProfileOnboarding.tsx @@ -241,6 +241,14 @@ const ProfileOnboarding: React.FC = ({ }; const handleSubmit = async () => { + if (!form.largePic) { + Alert.alert('Please upload a large profile picture!'); + return; + } + if (!form.smallPic) { + Alert.alert('Please upload a small profile picture!'); + return; + } if (!form.attemptedSubmit) { setForm({ ...form, diff --git a/src/screens/onboarding/RegistrationThree.tsx b/src/screens/onboarding/RegistrationThree.tsx index babb0334..fd742728 100644 --- a/src/screens/onboarding/RegistrationThree.tsx +++ b/src/screens/onboarding/RegistrationThree.tsx @@ -173,7 +173,11 @@ const RegistrationThree: React.FC = ({ if (statusCode === 201) { try { await AsyncStorage.setItem('token', data.token); - navigation.navigate('Checkpoint', { + /* + * Skipping navigation to Checkpoint for alpha + * navigation.navigate('Checkpoint', { userId: userId, username: form.username }); + */ + navigation.navigate('ProfileOnboarding', { userId: userId, username: form.username, }); -- cgit v1.2.3-70-g09d2