-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathApp.js
38 lines (35 loc) · 1.37 KB
/
App.js
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
import * as React from 'react';
import {createDrawerNavigator} from '@react-navigation/drawer';
import {NavigationContainer} from '@react-navigation/native';
import HomeScreen from './components/HomeScreen';
import GymScreen from './components/GymScreen';
import CleaningScreen from './components/CleaningScreen';
import GroceriesScreen from './components/GroceriesScreen';
import TodoScreen from './components/TodoScreen';
import MiscScreen from './components/MiscScreen';
import AboutScreen from './components/AboutScreen';
import {init} from './database/db';
init()
.then(() => {
console.log('Database creation succeeded!');
})
.catch(err => {
console.log('Database IS NOT initialized! ' + err);
});
const Drawer = createDrawerNavigator();
const App = () => {
return (
<NavigationContainer>
<Drawer.Navigator initialRouteName="Home">
<Drawer.Screen name="Home" component={HomeScreen} />
<Drawer.Screen name="Gym" component={GymScreen} />
<Drawer.Screen name="Cleaning" component={CleaningScreen} />
<Drawer.Screen name="Groceries" component={GroceriesScreen} />
<Drawer.Screen name="To-Do" component={TodoScreen} />
<Drawer.Screen name="Miscellaneous" component={MiscScreen} />
<Drawer.Screen name="About" component={AboutScreen} />
</Drawer.Navigator>
</NavigationContainer>
);
};
export default App;