Geen omschrijving

Navigation.js 1.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. import React from "react";
  2. import { createBottomTabNavigator } from "@react-navigation/bottom-tabs";
  3. import { createNativeStackNavigator } from "@react-navigation/native-stack";
  4. import { NavigationContainer } from "@react-navigation/native";
  5. import Denuncias from "./screens/Denuncias";
  6. import Derechos from "./screens/Derechos";
  7. import Analisis from "./screens/Analisis";
  8. import Formulario from "./screens/Formulario";
  9. import Lista from "./screens/Lista";
  10. import Drna from "./screens/Drna";
  11. const StackDenuncias = createNativeStackNavigator();
  12. function Stacks() {
  13. return (
  14. <StackDenuncias.Navigator
  15. initialRouteName="DenunciasIni"
  16. >
  17. <StackDenuncias.Screen
  18. name="DenunciasIni"
  19. component={Denuncias}
  20. />
  21. <StackDenuncias.Screen
  22. name="Formulario"
  23. component={Formulario}
  24. />
  25. <StackDenuncias.Screen
  26. name="Lista"
  27. component={Lista}
  28. />
  29. <StackDenuncias.Screen
  30. name="Drna"
  31. component={Drna}
  32. />
  33. </StackDenuncias.Navigator>
  34. )
  35. }
  36. const Tab = createBottomTabNavigator();
  37. function Tabs() {
  38. return (
  39. <Tab.Navigator
  40. initialRouteName="Denuncias">
  41. <Tab.Screen name="Denuncias" component={Stacks}
  42. options={{
  43. headerShown:false
  44. }} />
  45. <Tab.Screen name="Derechos" component={Derechos} />
  46. <Tab.Screen name="Analisis" component={Analisis} />
  47. </Tab.Navigator>
  48. );
  49. }
  50. export default function Navigation(){
  51. return (
  52. <NavigationContainer>
  53. <Tabs />
  54. </NavigationContainer>
  55. );
  56. }