Add auth navigations
This commit is contained in:
parent
fc3b2952bb
commit
802222fe71
11 changed files with 129 additions and 25 deletions
|
@ -1,8 +1,10 @@
|
|||
import React from 'react'
|
||||
import {Text, Button, View, SafeAreaView} from 'react-native'
|
||||
import type {PrimaryTabScreenProps} from '../routes/types'
|
||||
import {useStores} from '../state'
|
||||
|
||||
export const Home = ({navigation}: PrimaryTabScreenProps<'Home'>) => {
|
||||
export function Home({navigation}: PrimaryTabScreenProps<'Home'>) {
|
||||
const store = useStores()
|
||||
return (
|
||||
<SafeAreaView style={{flex: 1}}>
|
||||
<View style={{flex: 1}}>
|
||||
|
@ -11,6 +13,7 @@ export const Home = ({navigation}: PrimaryTabScreenProps<'Home'>) => {
|
|||
title="Go to Jane's profile"
|
||||
onPress={() => navigation.navigate('Profile', {name: 'Jane'})}
|
||||
/>
|
||||
<Button title="Logout" onPress={() => store.session.setAuthed(false)} />
|
||||
</View>
|
||||
</SafeAreaView>
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue