Aucune description

Navigation.js 1.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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 the screens to be used in the navigator
  6. import Denuncias from "./screens/Denuncias";
  7. import Derechos from "./screens/Derechos";
  8. import Analisis from "./screens/Analisis";
  9. import Formulario from "./screens/Formulario";
  10. import Lista from "./screens/Lista";
  11. import Drna from "./screens/Drna";
  12. const StackDenuncias = createNativeStackNavigator();
  13. function Stacks() {
  14. return (
  15. <StackDenuncias.Navigator initialRouteName="DenunciasIni">
  16. <StackDenuncias.Screen name="DenunciasIni" component={Denuncias} />
  17. <StackDenuncias.Screen name="Formulario" component={Formulario} />
  18. <StackDenuncias.Screen name="Lista" component={Lista} />
  19. <StackDenuncias.Screen name="Drna" component={Drna} />
  20. </StackDenuncias.Navigator>
  21. );
  22. }
  23. const Tab = createBottomTabNavigator();
  24. function Tabs() {
  25. return (
  26. <Tab.Navigator initialRouteName="Denuncias">
  27. <Tab.Screen
  28. name="Denuncias"
  29. component={Stacks}
  30. options={{
  31. headerShown: false,
  32. }}
  33. />
  34. <Tab.Screen name="Derechos" component={Derechos} />
  35. <Tab.Screen name="Analisis" component={Analisis} />
  36. </Tab.Navigator>
  37. );
  38. }
  39. export default function Navigation() {
  40. return (
  41. <NavigationContainer>
  42. <Tabs />
  43. </NavigationContainer>
  44. );
  45. }