Browse Source

adding 'dados' context to map feed screen

master
analuizaff 4 years ago
parent
commit
2b328c39b3
  1. 11
      src/app/screens/MapFeedScreen.js
  2. 240
      src/package-lock.json
  3. 2
      src/package.json

11
src/app/screens/MapFeedScreen.js

@ -1,4 +1,4 @@
import React, { useContext, useEffect, useState } from "react";
import React, { useContext } from "react";
import { StyleSheet, View } from "react-native"; import { StyleSheet, View } from "react-native";
import MapView from "react-native-maps"; import MapView from "react-native-maps";
@ -8,9 +8,11 @@ import attachFocusToQuery from "../hooks/useFocus";
import { CurrentLocationContext } from "../context/CurrentLocationContext"; import { CurrentLocationContext } from "../context/CurrentLocationContext";
import { MapMarkerList } from "../components/MapMarkerList"; import { MapMarkerList } from "../components/MapMarkerList";
import FloatButton from "../components/FloatButton"; import FloatButton from "../components/FloatButton";
import { MapDataContext } from "../context/MapDataContext";
function MapFeedScreen(props) { function MapFeedScreen(props) {
const context = useContext(CurrentLocationContext); const context = useContext(CurrentLocationContext);
const datas = useContext(MapDataContext);
const location = context.currentCoordinates; const location = context.currentCoordinates;
const focusChanged = attachFocusToQuery(); const focusChanged = attachFocusToQuery();
@ -39,7 +41,12 @@ function MapFeedScreen(props) {
...lat_long_delta, ...lat_long_delta,
}} }}
> >
<MapMarkerList reload={focusChanged} />
<MapMarkerList
reload={focusChanged}
renderRain={datas.rain}
renderFlood={datas.flood}
renderPluviometer={datas.pluviometer}
renderRiver={datas.river} />
</MapView> </MapView>
<FloatButton /> <FloatButton />
</View> </View>

240
src/package-lock.json

@ -3252,6 +3252,11 @@
} }
} }
}, },
"@react-native-community/checkbox": {
"version": "0.5.7",
"resolved": "https://registry.npmjs.org/@react-native-community/checkbox/-/checkbox-0.5.7.tgz",
"integrity": "sha512-CiHBAMWy5fsFIHLd1pf8frlWrLT8DnCXUSxdlGKazHm7srQSReKH4R5absShjmYOHRo9raWEnKZO/cm7MUDHZg=="
},
"@react-native-community/cli-debugger-ui": { "@react-native-community/cli-debugger-ui": {
"version": "4.9.0", "version": "4.9.0",
"resolved": "https://registry.npmjs.org/@react-native-community/cli-debugger-ui/-/cli-debugger-ui-4.9.0.tgz", "resolved": "https://registry.npmjs.org/@react-native-community/cli-debugger-ui/-/cli-debugger-ui-4.9.0.tgz",
@ -9450,6 +9455,11 @@
"resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
"integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo="
}, },
"is-utf8": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz",
"integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI="
},
"is-weakmap": { "is-weakmap": {
"version": "2.0.1", "version": "2.0.1",
"resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.1.tgz", "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.1.tgz",
@ -15912,6 +15922,19 @@
"resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz",
"integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==" "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g=="
}, },
"pinkie": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz",
"integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA="
},
"pinkie-promise": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz",
"integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=",
"requires": {
"pinkie": "^2.0.0"
}
},
"pirates": { "pirates": {
"version": "4.0.1", "version": "4.0.1",
"resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.1.tgz", "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.1.tgz",
@ -16669,6 +16692,14 @@
"resolved": "https://registry.npmjs.org/react-native-multiple-choice/-/react-native-multiple-choice-0.0.8.tgz", "resolved": "https://registry.npmjs.org/react-native-multiple-choice/-/react-native-multiple-choice-0.0.8.tgz",
"integrity": "sha1-732ZrBBElBzfi5QQnMWjMHqhnoc=" "integrity": "sha1-732ZrBBElBzfi5QQnMWjMHqhnoc="
}, },
"react-native-multiple-select-list": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/react-native-multiple-select-list/-/react-native-multiple-select-list-1.0.4.tgz",
"integrity": "sha1-Wc326ol7XuR8ftvzE+qES83kq74=",
"requires": {
"react-native-vector-icons": "^3.0.0"
}
},
"react-native-places-input": { "react-native-places-input": {
"version": "1.1.7", "version": "1.1.7",
"resolved": "https://registry.npmjs.org/react-native-places-input/-/react-native-places-input-1.1.7.tgz", "resolved": "https://registry.npmjs.org/react-native-places-input/-/react-native-places-input-1.1.7.tgz",
@ -16747,6 +16778,207 @@
"resolved": "https://registry.npmjs.org/react-native-tab-view/-/react-native-tab-view-2.15.2.tgz", "resolved": "https://registry.npmjs.org/react-native-tab-view/-/react-native-tab-view-2.15.2.tgz",
"integrity": "sha512-2hxLkBnZtEKFDyfvNO5EUywhy3f/EiLOBO8SWqKj4BMBTO0QwnybaPE5MVF00Fhz+VA4+h/iI40Dkrrtq70dGg==" "integrity": "sha512-2hxLkBnZtEKFDyfvNO5EUywhy3f/EiLOBO8SWqKj4BMBTO0QwnybaPE5MVF00Fhz+VA4+h/iI40Dkrrtq70dGg=="
}, },
"react-native-vector-icons": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/react-native-vector-icons/-/react-native-vector-icons-3.0.0.tgz",
"integrity": "sha1-ovY3V97k+4n2fu9mDiXoaSauaCc=",
"requires": {
"lodash": "^4.0.0",
"yargs": "^6.3.0"
},
"dependencies": {
"ansi-regex": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8="
},
"camelcase": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz",
"integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo="
},
"cliui": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz",
"integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=",
"requires": {
"string-width": "^1.0.1",
"strip-ansi": "^3.0.1",
"wrap-ansi": "^2.0.0"
}
},
"find-up": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz",
"integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=",
"requires": {
"path-exists": "^2.0.0",
"pinkie-promise": "^2.0.0"
}
},
"get-caller-file": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz",
"integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w=="
},
"is-fullwidth-code-point": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
"integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
"requires": {
"number-is-nan": "^1.0.0"
}
},
"load-json-file": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz",
"integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=",
"requires": {
"graceful-fs": "^4.1.2",
"parse-json": "^2.2.0",
"pify": "^2.0.0",
"pinkie-promise": "^2.0.0",
"strip-bom": "^2.0.0"
}
},
"os-locale": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz",
"integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=",
"requires": {
"lcid": "^1.0.0"
}
},
"parse-json": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz",
"integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=",
"requires": {
"error-ex": "^1.2.0"
}
},
"path-exists": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz",
"integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=",
"requires": {
"pinkie-promise": "^2.0.0"
}
},
"path-type": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz",
"integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=",
"requires": {
"graceful-fs": "^4.1.2",
"pify": "^2.0.0",
"pinkie-promise": "^2.0.0"
}
},
"pify": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
"integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw="
},
"read-pkg": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz",
"integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=",
"requires": {
"load-json-file": "^1.0.0",
"normalize-package-data": "^2.3.2",
"path-type": "^1.0.0"
}
},
"read-pkg-up": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz",
"integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=",
"requires": {
"find-up": "^1.0.0",
"read-pkg": "^1.0.0"
}
},
"require-main-filename": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz",
"integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE="
},
"string-width": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
"integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
"strip-ansi": "^3.0.0"
}
},
"strip-ansi": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
"requires": {
"ansi-regex": "^2.0.0"
}
},
"strip-bom": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz",
"integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=",
"requires": {
"is-utf8": "^0.2.0"
}
},
"which-module": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz",
"integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8="
},
"wrap-ansi": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz",
"integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=",
"requires": {
"string-width": "^1.0.1",
"strip-ansi": "^3.0.1"
}
},
"y18n": {
"version": "3.2.2",
"resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.2.tgz",
"integrity": "sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ=="
},
"yargs": {
"version": "6.6.0",
"resolved": "https://registry.npmjs.org/yargs/-/yargs-6.6.0.tgz",
"integrity": "sha1-eC7CHvQDNF+DCoCMo9UTr1YGUgg=",
"requires": {
"camelcase": "^3.0.0",
"cliui": "^3.2.0",
"decamelize": "^1.1.1",
"get-caller-file": "^1.0.1",
"os-locale": "^1.4.0",
"read-pkg-up": "^1.0.1",
"require-directory": "^2.1.1",
"require-main-filename": "^1.0.1",
"set-blocking": "^2.0.0",
"string-width": "^1.0.2",
"which-module": "^1.0.0",
"y18n": "^3.2.1",
"yargs-parser": "^4.2.0"
}
},
"yargs-parser": {
"version": "4.2.1",
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-4.2.1.tgz",
"integrity": "sha1-KczqwNxPA8bIe0qfIX3RjJ90hxw=",
"requires": {
"camelcase": "^3.0.0"
}
}
}
},
"react-native-walkthrough-tooltip": { "react-native-walkthrough-tooltip": {
"version": "1.2.0", "version": "1.2.0",
"resolved": "https://registry.npmjs.org/react-native-walkthrough-tooltip/-/react-native-walkthrough-tooltip-1.2.0.tgz", "resolved": "https://registry.npmjs.org/react-native-walkthrough-tooltip/-/react-native-walkthrough-tooltip-1.2.0.tgz",
@ -17329,6 +17561,14 @@
"glob": "^7.1.3" "glob": "^7.1.3"
} }
}, },
"rn-checkbox-list": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/rn-checkbox-list/-/rn-checkbox-list-0.4.0.tgz",
"integrity": "sha512-qD2VWnGXgQBqvpQweRLMzhTx5+ETkWHpaFgy5ilm9mU3JCP/Mf1IZE2vaWV9KtRa1GHBWLqDUm+LlPyHuf2zDA==",
"requires": {
"@react-native-community/checkbox": "^0.5.1"
}
},
"rndm": { "rndm": {
"version": "1.2.0", "version": "1.2.0",
"resolved": "https://registry.npmjs.org/rndm/-/rndm-1.2.0.tgz", "resolved": "https://registry.npmjs.org/rndm/-/rndm-1.2.0.tgz",

2
src/package.json

@ -44,6 +44,7 @@
"react-native-keyboard-aware-scroll-view": "^0.9.3", "react-native-keyboard-aware-scroll-view": "^0.9.3",
"react-native-maps": "0.27.1", "react-native-maps": "0.27.1",
"react-native-multiple-choice": "0.0.8", "react-native-multiple-choice": "0.0.8",
"react-native-multiple-select-list": "^1.0.4",
"react-native-places-input": "^1.1.7", "react-native-places-input": "^1.1.7",
"react-native-reanimated": "~1.13.0", "react-native-reanimated": "~1.13.0",
"react-native-safe-area-context": "3.1.4", "react-native-safe-area-context": "3.1.4",
@ -57,6 +58,7 @@
"react-navigation": "^4.4.3", "react-navigation": "^4.4.3",
"react-navigation-header-buttons": "^7.0.1", "react-navigation-header-buttons": "^7.0.1",
"react-navigation-tabs": "^2.10.1", "react-navigation-tabs": "^2.10.1",
"rn-checkbox-list": "^0.4.0",
"searchable-flatlist": "0.0.4", "searchable-flatlist": "0.0.4",
"yup": "^0.28.5" "yup": "^0.28.5"
}, },

Loading…
Cancel
Save