diff options
| author | Leon Jiang <35908040+leonyjiang@users.noreply.github.com> | 2020-06-25 16:28:00 -0700 |
|---|---|---|
| committer | Leon Jiang <35908040+leonyjiang@users.noreply.github.com> | 2020-06-25 16:28:00 -0700 |
| commit | bc8184b1a402af0c3e54edb79b38ed8e09a6798d (patch) | |
| tree | 2ac23485a81086ab4e5df2989e2002c7e67cd56a /src/screens/Login.tsx | |
| parent | 36a6781faad4380e7c401f32506707c0e48a15f5 (diff) | |
cleanup file structure, add react-navigation & basic routes
Diffstat (limited to 'src/screens/Login.tsx')
| -rw-r--r-- | src/screens/Login.tsx | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/screens/Login.tsx b/src/screens/Login.tsx new file mode 100644 index 00000000..0305b907 --- /dev/null +++ b/src/screens/Login.tsx @@ -0,0 +1,27 @@ +import React from 'react'; +import {RouteProp} from '@react-navigation/native'; +import {StackNavigationProp} from '@react-navigation/stack'; +import {View, Text, Button} from 'react-native'; + +import {RootStackParams} from '../routes'; + +type LoginScreenRouteProp = RouteProp<RootStackParams, 'Login'>; +type LoginScreenNavigationProp = StackNavigationProp<RootStackParams, 'Login'>; + +interface LoginProps { + route: LoginScreenRouteProp; + navigation: LoginScreenNavigationProp; +} +const Login = ({navigation}: LoginProps) => { + return ( + <View style={{flex: 1, justifyContent: 'center', alignItems: 'center'}}> + <Text style={{fontSize: 18}}>Welcome to Tagg! Login page goes here.</Text> + <Button + title="Register" + onPress={() => navigation.navigate('Registration')} + /> + </View> + ); +}; + +export default Login; |
