Browse Source

solving navigation to 'sharingDataScreen' problem

master
analuizaff 4 years ago
parent
commit
ade501ceed
  1. 14
      src/app/navigation/AppNavigator.js
  2. 1
      src/app/navigation/SharingDataOptionsNavigator.js

14
src/app/navigation/AppNavigator.js

@ -7,14 +7,13 @@ import FeedNavigator from "./FeedNavigator";
import MessagesNavigator from "./MessagesNavigator";
import OfficialMessagesNavigator from "./OfficialMessagesNavigator";
import NewListingButton from "./NewListingButton";
import routes from "./routes";
import SharingDataNavigator from "./SharingDataNavigator";
import SharingDataOptionsNavigator from "./SharingDataOptionsNavigator";
const Tab = createBottomTabNavigator();
const AppNavigator = () => (
<Tab.Navigator style={{backgroundColor: "white"}}>
<Tab.Navigator style={{ backgroundColor: "white" }}>
<Tab.Screen
name="Home"
component={FeedNavigator}
@ -44,10 +43,11 @@ const AppNavigator = () => (
options={({ navigation }) => ({
tabBarButton: () => (
<NewListingButton
onPress={() =>
//navigation.goBack(null)
navigation.navigate(routes.SHARING_DATA)}
onPress={() =>
navigation.reset({
index: 0,
routes: [{ name: "SharingData" }],
})}
/>
),
tabBarIcon: ({ color, size }) => (

1
src/app/navigation/SharingDataOptionsNavigator.js

@ -7,7 +7,6 @@ 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';

Loading…
Cancel
Save