Browse Source

returning menu otptions to form screens

master
analuizaff 4 years ago
parent
commit
2626e748db
  1. 4
      src/App.js
  2. 3
      src/app/navigation/AppNavigator.js
  3. 6
      src/app/navigation/SharingDataOptionsNavigator.js

4
src/App.js

@ -8,7 +8,7 @@ import openDatabase from "./app/database/database-connection";
import initDatabase from "./app/database/database-init";
import FlashMessage from "react-native-flash-message";
import { createStackNavigator } from '@react-navigation/stack';
import SharingDataOptionsNavigator from "./app/navigation/SharingDataOptionsNavigator";
import AppNavigator from "./app/navigation/AppNavigator";
export default function App() {
global.userDataBase = openDatabase();
@ -17,7 +17,7 @@ export default function App() {
return (
<NavigationContainer theme={navigationTheme}>
<SharingDataOptionsNavigator/>
<AppNavigator/>
<FlashMessage position="top"/>
</NavigationContainer>
);

3
src/app/navigation/AppNavigator.js

@ -9,6 +9,7 @@ import OfficialMessagesNavigator from "./OfficialMessagesNavigator";
import NewListingButton from "./NewListingButton";
import routes from "./routes";
import SharingDataNavigator from "./SharingDataNavigator";
import SharingDataOptionsNavigator from "./SharingDataOptionsNavigator";
const Tab = createBottomTabNavigator();
@ -39,7 +40,7 @@ const AppNavigator = () => (
<Tab.Screen
name="SharingData"
component={SharingDataNavigator}
component={SharingDataOptionsNavigator}
options={({ navigation }) => ({
tabBarButton: () => (
<NewListingButton

6
src/app/navigation/SharingDataOptionsNavigator.js

@ -1,12 +1,14 @@
import React from 'react';
import { createStackNavigator } from "@react-navigation/stack";
import AppNavigator from './AppNavigator';
import RainSharingDataScreen from '../screens/RainSharingDataScreen';
import RiverFloodSharingDataScreen from '../screens/RiverFloodSharingDataScreen';
import SharingFloodZonesScreen from '../screens/SharingFloodZonesScreen';
import PluviometerSharingDataScreen from '../screens/PluviometerSharingDataScreen';
import SharingDataScreen from '../screens/SharingDataScreen';
import SharingDataNavigator from './SharingDataNavigator';
const Stack = createStackNavigator();
@ -16,7 +18,7 @@ function SharingDataOptionsNavigator() {
<Stack.Navigator initialRouteName="SharingData">
<Stack.Screen
name="Voltar"
component={AppNavigator}
component={SharingDataNavigator}
options={{
headerShown: false
}}

Loading…
Cancel
Save