Add auth navigations

This commit is contained in:
Paul Frazee 2022-06-09 17:13:29 -05:00
parent fc3b2952bb
commit 802222fe71
11 changed files with 129 additions and 25 deletions

17
src/screens/Login.tsx Normal file
View file

@ -0,0 +1,17 @@
import React from 'react'
import {Text, Button, View, SafeAreaView} from 'react-native'
import type {RootStackScreenProps} from '../routes/types'
import {useStores} from '../state'
export function Login({navigation}: RootStackScreenProps<'Login'>) {
const store = useStores()
return (
<SafeAreaView style={{flex: 1}}>
<View style={{flex: 1}}>
<Text>Welcome! Time to sign in</Text>
<Button title="Login" onPress={() => store.session.setAuthed(true)} />
<Button title="Sign Up" onPress={() => navigation.navigate('Signup')} />
</View>
</SafeAreaView>
)
}