|
@ -21,7 +21,6 @@ import assets from "../config/assets"; |
|
|
import moment from "moment"; |
|
|
import moment from "moment"; |
|
|
import FormDatePicker from "../components/forms/FormDatePicker"; |
|
|
import FormDatePicker from "../components/forms/FormDatePicker"; |
|
|
import FormLocationPicker from "../components/forms/FormLocationPicker"; |
|
|
import FormLocationPicker from "../components/forms/FormLocationPicker"; |
|
|
import { CurrentLocationContext } from "../context/CurrentLocationContext"; |
|
|
|
|
|
import { EventLocationContext } from "../context/EventLocationContext"; |
|
|
import { EventLocationContext } from "../context/EventLocationContext"; |
|
|
|
|
|
|
|
|
const validationSchema = Yup.object().shape({ |
|
|
const validationSchema = Yup.object().shape({ |
|
@ -34,15 +33,14 @@ const borderWidth = 4; |
|
|
function RainSharingDataScreen(props) { |
|
|
function RainSharingDataScreen(props) { |
|
|
const [rain, setRain] = useState(-1); |
|
|
const [rain, setRain] = useState(-1); |
|
|
const [error, setError] = useState(false); |
|
|
const [error, setError] = useState(false); |
|
|
const location = "useLocation()"; |
|
|
|
|
|
|
|
|
|
|
|
const dims = scaleDimsFromWidth(85, 85, 27); |
|
|
|
|
|
|
|
|
const dims = scaleDimsFromWidth(85, 85, 27); |
|
|
|
|
|
|
|
|
const [date, setDate] = useState(moment()); |
|
|
const [date, setDate] = useState(moment()); |
|
|
const [time, setTime] = useState(moment()); |
|
|
const [time, setTime] = useState(moment()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//======== testei aqui pra ver se atualiza a localização pro default quando abre o formulário ===========
|
|
|
//======== testei aqui pra ver se atualiza a localização pro default quando abre o formulário ===========
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const context = useContext(EventLocationContext); |
|
|
const context = useContext(EventLocationContext); |
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
useEffect(() => { |
|
@ -50,6 +48,8 @@ function RainSharingDataScreen(props) { |
|
|
}, []); |
|
|
}, []); |
|
|
//========================================================================================================
|
|
|
//========================================================================================================
|
|
|
|
|
|
|
|
|
|
|
|
const location = context.eventCoordinates; |
|
|
|
|
|
|
|
|
return ( |
|
|
return ( |
|
|
<Screen style={styles.container}> |
|
|
<Screen style={styles.container}> |
|
|
<ScrollView> |
|
|
<ScrollView> |
|
|