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