From 1f4e0c105a62a5514831998c767d07e31a14b34b Mon Sep 17 00:00:00 2001 From: GabrielTrettel Date: Tue, 23 Nov 2021 16:35:16 -0300 Subject: [PATCH] Fixing hard-coded variables and setting location zoom --- src/App.js | 4 ++-- src/app/components/map/OpenStreetMap.js | 2 +- src/app/config/globals.js | 1 + src/app/screens/MapFeedScreen.js | 12 +++++++++--- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/App.js b/src/App.js index eb3f2ca..45446ce 100644 --- a/src/App.js +++ b/src/App.js @@ -49,7 +49,7 @@ export default function App() { const storageUser = await authStorage.getUser(); if (storageUser) setUser(storageUser); - global.location = { lat: -9.97111566376452, long: -67.80984283755332 }; //await getLocation(); + global.location = await getLocation(); }; if (!isReady && netInfo.isInternetReachable) { @@ -61,7 +61,7 @@ export default function App() { /> ); } else if (netInfo.isInternetReachable) { - global.formsSockets = useFiltering(global.location); + global.formsSockets = useFiltering(global.location || global.defaultLocation); return ( + ):( + + Apresentar um erro no futuro + + ) ); }