-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathApp.tsx
30 lines (26 loc) · 840 Bytes
/
App.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import { StatusBar } from 'expo-status-bar';
import { Button, StyleSheet, Text, View } from 'react-native';
import { BoardGameForm } from './src/Components/BoardGameForm';
import { GameList } from './src/Components/GameList';
import { getDb } from './src/model/helpers';
import { sync } from './src/model/sync';
const gamesQuery = getDb().get('board_games').query();
export default function App() {
return (
<View style={styles.container}>
<GameList games={gamesQuery} />
<BoardGameForm />
{/* For the demo we choose to Sync manually, for test purposes. */}
<Button title='SYNC' onPress={sync} />
<StatusBar style='auto' />
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
});