-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
52 lines (51 loc) · 1.73 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import 'react-native-gesture-handler';
import React from 'react';
import { createDrawerNavigator } from '@react-navigation/drawer';
import { NavigationContainer } from '@react-navigation/native';
import {
useFonts,
Poppins_400Regular,
Poppins_600SemiBold,
} from '@expo-google-fonts/poppins';
import HomeScreen from './components/HomeScreen.js';
import FinishedTasksComponent from './components/FinishedTasksScreen.js';
import AboutmeScreen from './components/AboutmeScreen.js';
import { SafeAreaProvider } from 'react-native-safe-area-context';
import TasksContextProvider from './components/TasksContextProvider.js';
export default function App() {
const Drawer = createDrawerNavigator();
const [fontsLoaded] = useFonts({ Poppins_400Regular, Poppins_600SemiBold });
if (!fontsLoaded) {
return null;
}
return (
<SafeAreaProvider>
<TasksContextProvider>
<NavigationContainer>
<Drawer.Navigator
initialRouteName='Home'
screenOptions={{
headerShown: false,
drawerType: 'back',
drawerActiveBackgroundColor: '#6320EE',
drawerActiveTintColor: 'white',
drawerItemStyle: {
borderRadius: 5,
},
drawerLabelStyle: {
fontFamily: 'Poppins_600SemiBold',
},
}}
>
<Drawer.Screen name='Tasks' component={HomeScreen} />
<Drawer.Screen
name='Finished Tasks'
component={FinishedTasksComponent}
/>
<Drawer.Screen name='About me' component={AboutmeScreen} />
</Drawer.Navigator>
</NavigationContainer>
</TasksContextProvider>
</SafeAreaProvider>
);
}