Browse Source

Another attempt to solve a navigation problem to 'SharingDataScreen'

master
analuizaff 3 years ago
parent
commit
59d38721df
  1. 7
      src/app/navigation/AppNavigator.js
  2. 1
      src/app/screens/PluviometerSharingDataScreen.js
  3. 6
      src/app/screens/RainSharingDataScreen.js
  4. 1
      src/app/screens/RiverFloodSharingDataScreen.js
  5. 1
      src/app/screens/SharingFloodZonesScreen.js

7
src/app/navigation/AppNavigator.js

@ -43,10 +43,9 @@ const AppNavigator = () => (
tabBarButton: () => (
<NewListingButton
onPress={() =>
navigation.reset({
index: 0,
key: "RainSharingData",
routes: [{ name: "SharingData" }],
navigation.navigate("SharingData",{
screen:"Voltar",
initial: false,
})
}
/>

1
src/app/screens/PluviometerSharingDataScreen.js

@ -64,7 +64,6 @@ function PluviometerSharingDataScreen(props) {
icon: "success",
type: "success",
});
props.navigation.goBack();
props.navigation.navigate("Home");
}}
validationSchema={validationSchema}

6
src/app/screens/RainSharingDataScreen.js

@ -41,12 +41,6 @@ function RainSharingDataScreen(props) {
context.defaultLocation();
}, []);
console.log(props.route)
/*useEffect(() => {
!isFocused &&
props.navigation.goBack();
}, [isFocused])*/
const location = context.eventCoordinates;
const address = context.eventLocation;

1
src/app/screens/RiverFloodSharingDataScreen.js

@ -72,7 +72,6 @@ function RiverFloodSharingDataScreen(props) {
icon: "success",
type: "success",
});
props.navigation.goBack();
props.navigation.navigate("Home");
}}
validationSchema={validationSchema}

1
src/app/screens/SharingFloodZonesScreen.js

@ -68,7 +68,6 @@ function SharingFloodZonesScreen(props) {
icon: "success",
type: "success",
});
props.navigation.goBack();
props.navigation.navigate("Home");
}}
validationSchema={validationSchema}

Loading…
Cancel
Save