|
|
@ -17,7 +17,7 @@ const validationSchema = Yup.object().shape({ |
|
|
|
|
|
|
|
const borderWidth = 4; |
|
|
|
|
|
|
|
function RiverFloodSharingDataScreen() { |
|
|
|
function RiverFloodSharingDataScreen(props) { |
|
|
|
const [riverScale, setRiverScale] = useState(0); |
|
|
|
const location = useLocation(); |
|
|
|
|
|
|
@ -38,9 +38,10 @@ function RiverFloodSharingDataScreen() { |
|
|
|
initialValues={{ |
|
|
|
images: [], |
|
|
|
}} |
|
|
|
onSubmit={(values) => |
|
|
|
insertRiverData({ ...values, riverScale, location }) |
|
|
|
} |
|
|
|
onSubmit={(values) => { |
|
|
|
insertRiverData({ ...values, riverScale, location }); |
|
|
|
props.navigation.goBack(null); |
|
|
|
}} |
|
|
|
validationSchema={validationSchema} |
|
|
|
> |
|
|
|
<View> |
|
|
@ -106,7 +107,11 @@ function RiverFloodSharingDataScreen() { |
|
|
|
</View> |
|
|
|
<FormImagePicker backgroundColor="#1976D2" name="images" /> |
|
|
|
|
|
|
|
<SubmitButton title="Enviar" backgroundColor={colors.primary} /> |
|
|
|
<SubmitButton |
|
|
|
title="Enviar" |
|
|
|
backgroundColor={colors.primary} |
|
|
|
onPress={() => props.navigation.pop()} |
|
|
|
/> |
|
|
|
</Form> |
|
|
|
</Screen> |
|
|
|
); |
|
|
|