Browse Source

solving navigation to 'sharingDataScreen' problem

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

12
src/app/navigation/AppNavigator.js

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

1
src/app/navigation/SharingDataOptionsNavigator.js

@ -7,7 +7,6 @@ import RainSharingDataScreen from '../screens/RainSharingDataScreen';
import RiverFloodSharingDataScreen from '../screens/RiverFloodSharingDataScreen'; import RiverFloodSharingDataScreen from '../screens/RiverFloodSharingDataScreen';
import SharingFloodZonesScreen from '../screens/SharingFloodZonesScreen'; import SharingFloodZonesScreen from '../screens/SharingFloodZonesScreen';
import PluviometerSharingDataScreen from '../screens/PluviometerSharingDataScreen'; import PluviometerSharingDataScreen from '../screens/PluviometerSharingDataScreen';
import SharingDataScreen from '../screens/SharingDataScreen';
import SharingDataNavigator from './SharingDataNavigator'; import SharingDataNavigator from './SharingDataNavigator';

Loading…
Cancel
Save