diff options
| author | Ashm Walia <40498934+ashmgarv@users.noreply.github.com> | 2020-12-22 08:50:27 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-22 11:50:27 -0500 |
| commit | a954d6b6b88485dddc0ccfda634ffd102cb34ccd (patch) | |
| tree | 560f152dd92ccb482a2bbf6b094060525373322c /src/screens/onboarding/Login.tsx | |
| parent | 49ed044f5103cf6288fcf5b3ff6d3d720795860c (diff) | |
[TMA 446] Create category (#144)
* Added welcome page
* Working code
* Small fix
* Some more cleanup
* Fixes
* Cleanup
* Fix again
* Use gradient for white bg as well
* Fixed type
Diffstat (limited to 'src/screens/onboarding/Login.tsx')
| -rw-r--r-- | src/screens/onboarding/Login.tsx | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/screens/onboarding/Login.tsx b/src/screens/onboarding/Login.tsx index cb550ef8..1315fdf5 100644 --- a/src/screens/onboarding/Login.tsx +++ b/src/screens/onboarding/Login.tsx @@ -17,10 +17,15 @@ import {OnboardingStackParams} from '../../routes/onboarding'; import {Background, TaggInput, SubmitButton} from '../../components'; import {usernameRegex, LOGIN_ENDPOINT} from '../../constants'; import AsyncStorage from '@react-native-community/async-storage'; -import {UserType} from '../../types'; +import { + BackgroundGradientType, + CategorySelectionScreenType, + UserType, +} from '../../types'; import {useDispatch} from 'react-redux'; import {userLogin} from '../../utils'; import SplashScreen from 'react-native-splash-screen'; +import {MOMENT_CATEGORIES_MAP} from '../../store/initialStates'; type VerificationScreenRouteProp = RouteProp<OnboardingStackParams, 'Login'>; type VerificationScreenNavigationProp = StackNavigationProp< @@ -194,8 +199,8 @@ const Login: React.FC<LoginProps> = ({navigation}: LoginProps) => { /* * Handles tap on "Get Started" text by resetting fields & navigating to the registration page. */ - const goToRegistration = () => { - navigation.navigate('InvitationCodeVerification'); + const startRegistrationProcess = () => { + navigation.navigate('WelcomeScreen'); setForm({...form, attemptedSubmit: false}); }; @@ -244,7 +249,7 @@ const Login: React.FC<LoginProps> = ({navigation}: LoginProps) => { accessible={true} accessibilityLabel="Get started" style={styles.getStarted} - onPress={goToRegistration}> + onPress={startRegistrationProcess}> Get started! </Text> </TouchableOpacity> @@ -252,7 +257,10 @@ const Login: React.FC<LoginProps> = ({navigation}: LoginProps) => { ); return ( - <Background centered style={styles.container}> + <Background + centered + style={styles.container} + gradientType={BackgroundGradientType.Light}> <StatusBar barStyle="light-content" /> <KeyboardAvoidingView behavior={Platform.OS === 'ios' ? 'padding' : 'height'} |
