Add desktop shell

This commit is contained in:
Paul Frazee 2022-06-09 21:34:43 -05:00
parent 802222fe71
commit 967f9fc474
16 changed files with 269 additions and 138 deletions

View file

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