-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.js
More file actions
41 lines (32 loc) · 927 Bytes
/
App.js
File metadata and controls
41 lines (32 loc) · 927 Bytes
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
31
32
33
34
35
36
37
38
39
40
41
/**
* The main body of DiaDiary app
*/
import { NavigationContainer } from '@react-navigation/native';
import { createRef, useEffect } from 'react';
import { View, Text, StyleSheet, Button, StatusBar } from 'react-native';
import MainDrawerNavigator from './components/MainNavigator';
import seedData from './global';
const clearData = false;
const navigationRef = createRef();
/**
* The root component of the app
*/
export default function App() {
StatusBar.setBarStyle('dark-content', true);
useEffect(() => {
seedData(navigationRef, clearData);
}, [clearData]);
const styles = StyleSheet.create({
main: {
width: '100%',
height: '100%',
},
});
return (
<View style={styles.main}>
<NavigationContainer ref={navigationRef}>
<MainDrawerNavigator/>
</NavigationContainer>
</View>
);
}