Add mock API and reorg code for clarity
This commit is contained in:
parent
de87ec17d1
commit
1d00f3b984
29 changed files with 356 additions and 168 deletions
21
src/view/screens/Home.tsx
Normal file
21
src/view/screens/Home.tsx
Normal file
|
@ -0,0 +1,21 @@
|
|||
import React from 'react'
|
||||
import {Text, Button, View} from 'react-native'
|
||||
import {Shell} from '../shell'
|
||||
import type {RootTabsScreenProps} from '../routes/types'
|
||||
import {useStores} from '../../state'
|
||||
|
||||
export function Home({navigation}: RootTabsScreenProps<'Home'>) {
|
||||
const store = useStores()
|
||||
return (
|
||||
<Shell>
|
||||
<View style={{alignItems: 'center'}}>
|
||||
<Text style={{fontSize: 20, fontWeight: 'bold'}}>Home</Text>
|
||||
<Button
|
||||
title="Go to Jane's profile"
|
||||
onPress={() => navigation.navigate('Profile', {name: 'Jane'})}
|
||||
/>
|
||||
<Button title="Logout" onPress={() => store.session.logout()} />
|
||||
</View>
|
||||
</Shell>
|
||||
)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue