diff --git a/src/App.js b/src/App.js index 5faf779..4679cbb 100644 --- a/src/App.js +++ b/src/App.js @@ -16,6 +16,7 @@ import { AuthContext } from "./app/auth/context"; import authStorage from "./app/auth/storage"; import MapDataProvider from "./app/context/MapDataContext"; import {getLocation} from "./app/hooks/useLocation"; +import { useFiltering } from "./app/hooks/useFiltering"; export default function App() { const [user, setUser] = useState(); @@ -23,8 +24,7 @@ export default function App() { const restoreUser = async () => { const user = await authStorage.getUser(); - global.location ={"lat":-10.0173780726763, - "long": -67.8170775249999} // await getLocation(); + global.location = await getLocation(); if (user) setUser(user); }; @@ -35,6 +35,7 @@ export default function App() { global.userDataBase = openDatabase(); initDatabase(global.userDataBase); + global.formsSockets = useFiltering(global.location); return (