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