Replace mobx-state-tree with mobx and get a basic home feed rendering
This commit is contained in:
parent
6b32698b3e
commit
dc55f58004
20 changed files with 534 additions and 273 deletions
|
@ -1,17 +1,18 @@
|
|||
import React from 'react'
|
||||
import {Text, Button, View, ActivityIndicator} from 'react-native'
|
||||
import {Text, View} from 'react-native'
|
||||
import {observer} from 'mobx-react-lite'
|
||||
import {Shell} from '../shell'
|
||||
import type {RootTabsScreenProps} from '../routes/types'
|
||||
import {useStores} from '../../state'
|
||||
// import type {RootTabsScreenProps} from '../routes/types'
|
||||
// import {useStores} from '../../state'
|
||||
|
||||
export const Login = observer(({navigation}: RootTabsScreenProps<'Login'>) => {
|
||||
const store = useStores()
|
||||
return (
|
||||
<Shell>
|
||||
<View style={{justifyContent: 'center', alignItems: 'center'}}>
|
||||
<Text style={{fontSize: 20, fontWeight: 'bold'}}>Sign In</Text>
|
||||
{store.session.uiError ?? <Text>{store.session.uiError}</Text>}
|
||||
export const Login = observer(
|
||||
(/*{navigation}: RootTabsScreenProps<'Login'>*/) => {
|
||||
// const store = useStores()
|
||||
return (
|
||||
<Shell>
|
||||
<View style={{justifyContent: 'center', alignItems: 'center'}}>
|
||||
<Text style={{fontSize: 20, fontWeight: 'bold'}}>Sign In</Text>
|
||||
{/*store.session.uiError && <Text>{store.session.uiError}</Text>}
|
||||
{!store.session.uiIsProcessing ? (
|
||||
<>
|
||||
<Button title="Login" onPress={() => store.session.login()} />
|
||||
|
@ -22,8 +23,9 @@ export const Login = observer(({navigation}: RootTabsScreenProps<'Login'>) => {
|
|||
</>
|
||||
) : (
|
||||
<ActivityIndicator />
|
||||
)}
|
||||
</View>
|
||||
</Shell>
|
||||
)
|
||||
})
|
||||
)*/}
|
||||
</View>
|
||||
</Shell>
|
||||
)
|
||||
},
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue