-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
57 lines (52 loc) · 1.62 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
53
54
55
56
57
import React from 'react';
import {enableScreens} from 'react-native-screens';
import {NavigationContainer} from '@react-navigation/native';
import {createStackNavigator} from '@react-navigation/stack';
import {createDrawerNavigator} from '@react-navigation/drawer';
import {
HomeScreen,
RadioScreen,
VideoScreen,
ContactScreen,
DrawerContent,
InformationScreen,
DenunciationScreen,
} from './src/screens';
import {NavigationHeader} from './src/components';
import {ApplicationProvider} from './src/context';
enableScreens();
const Stack = createStackNavigator();
const Drawer = createDrawerNavigator();
function Root() {
return (
<Stack.Navigator
screenOptions={{
header: NavigationHeader,
}}>
<Stack.Screen name="HomeScreen" component={HomeScreen} />
<Stack.Screen name="RadioScreen" component={RadioScreen} />
<Stack.Screen name="VideoScreen" component={VideoScreen} />
<Stack.Screen name="DenunciationScreen" component={DenunciationScreen} />
<Stack.Screen name="ContactScreen" component={ContactScreen} />
<Stack.Screen name="InformationScreen" component={InformationScreen} />
</Stack.Navigator>
);
}
function App() {
return (
<ApplicationProvider value={{hello: 'world'}}>
<NavigationContainer>
<Drawer.Navigator
screenOptions={{headerShown: false}}
drawerContent={DrawerContent}>
<Drawer.Screen
name="Root"
options={{title: 'Noticias'}}
component={Root}
/>
</Drawer.Navigator>
</NavigationContainer>
</ApplicationProvider>
);
}
export default App;