Add mock API and reorg code for clarity

This commit is contained in:
Paul Frazee 2022-07-18 15:24:37 -05:00
parent de87ec17d1
commit 1d00f3b984
29 changed files with 356 additions and 168 deletions

View file

@ -1,21 +0,0 @@
import React from 'react'
import {Text, Button, View} from 'react-native'
import {Shell} from '../platform/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>
)
}