-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.jsx
66 lines (60 loc) · 4.15 KB
/
App.jsx
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
58
59
60
61
62
63
64
65
import React from 'react'
import { View, Text, SafeAreaView } from 'react-native';
import { NavigationContainer } from '@react-navigation/native';
import { createStackNavigator } from '@react-navigation/stack'
import NavInicial from './src/navigation/NavegacaoInicial';
import { StackProtocolos } from './src/navigation/StackProtocolos';
import Repteis from './src/screens/repteis/Repteis';
import { AvesStackScreens } from './src/navigation/StackAves';
import { MamiferosStackScreen } from './src/navigation/StackMamiferos';
import EmergenciaAves from './src/screens/aves/EmergenciaAves';
import EmergenciaMamiferos from './src/screens/mamiferos/EmergenciaMamiferos';
import InicioWarn from './src/screens/InicioWarn';
import { createDrawerNavigator } from '@react-navigation/drawer';
import CalculadoraIndividual from './src/components/CalculadoraIndividual';
import Sobre from './src/screens/Sobre';
const Stack = createStackNavigator()
const Drawer = createDrawerNavigator();
export default function App() {
return (
<SafeAreaView style={{ flex: 1 }}>
<NavigationContainer>
<Drawer.Navigator
initialRouteName='InicioWarn'
backBehavior="history"
// screenOptions={{ headerShown: false, headerTitle: '' }}
>
<Stack.Screen name='InicioWarn' component={InicioWarn} options={{ headerShown: false, drawerItemStyle: { display: 'none' } }} />
<Stack.Screen name='NavInicial' component={NavInicial} options={{ headerShown: false, drawerLabel: 'Ínicio' }} />
<Stack.Screen name='Sobre' component={Sobre} options={{ headerShown: false, drawerLabel: 'Sobre' }} />
{/* <Stack.Screen name='Info' component={Info} options={{ drawerLabel: 'Informações' }} /> */}
<Stack.Screen name="protocolos" options={{ drawerLabel: 'Protocolos Anestésicos', headerShown: false}}>
{() => <Stack.Navigator screenOptions={{ headerShown: false, headerShown: false }}>
{Object.entries(StackProtocolos).map(([name, component]) => (
<Stack.Screen key={name} name={name} component={component.screen} />
))}
</Stack.Navigator>}
</Stack.Screen>
<Stack.Screen name="Aves" options={{ drawerLabel: 'Aves', headerShown: false}}>
{() => <Stack.Navigator screenOptions={{ headerShown: false }}>
{Object.entries(AvesStackScreens).map(([name, component]) => (
<Stack.Screen key={name} name={name} component={component.screen} />
))}
</Stack.Navigator>}
</Stack.Screen>
<Stack.Screen name="Mamiferos" options={{ drawerLabel: 'Mamíferos', headerShown: false}} >
{() => <Stack.Navigator screenOptions={{ headerShown: false }}>
{Object.entries(MamiferosStackScreen).map(([name, component]) => (
<Stack.Screen key={name} name={name} component={component.screen} />
))}
</Stack.Navigator>}
</Stack.Screen>
{/* <Stack.Screen name='Repteis' component={Repteis} /> */}
<Stack.Screen name='EmergenciaMamiferos' component={EmergenciaMamiferos} options={{ drawerItemStyle: { display: 'none' }, headerTitle: '', headerStyle:{ backgroundColor:'#c4c4c4' } }} />
<Stack.Screen name='EmergenciaAves' component={EmergenciaAves} options={{ drawerItemStyle: { display: 'none' }, headerTitle: '', headerStyle:{ backgroundColor:'#c4c4c4' } }} />
<Stack.Screen name='Calculadora Individual' component={CalculadoraIndividual} options={{ drawerLabel: 'Calculadora', headerShown: false, headerTitle: '', headerStyle:{ backgroundColor:'#c4c4c4' }}}/>
</Drawer.Navigator>
</NavigationContainer>
</SafeAreaView>
);
}