|
@ -43,7 +43,6 @@ export default function App() { |
|
|
} |
|
|
} |
|
|
}, [pluviometerStation]); |
|
|
}, [pluviometerStation]); |
|
|
|
|
|
|
|
|
// console.log(pluviometerStation);
|
|
|
|
|
|
|
|
|
|
|
|
const restoreUser = async () => { |
|
|
const restoreUser = async () => { |
|
|
const storageUser = await authStorage.getUser(); |
|
|
const storageUser = await authStorage.getUser(); |
|
@ -52,7 +51,7 @@ export default function App() { |
|
|
global.location = await getLocation(); |
|
|
global.location = await getLocation(); |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
if (!isReady && netInfo.isInternetReachable) { |
|
|
|
|
|
|
|
|
if (!isReady) { |
|
|
return ( |
|
|
return ( |
|
|
<AppLoading |
|
|
<AppLoading |
|
|
startAsync={restoreUser} |
|
|
startAsync={restoreUser} |
|
@ -60,7 +59,7 @@ export default function App() { |
|
|
onError={(e) => console.log(e)} |
|
|
onError={(e) => console.log(e)} |
|
|
/> |
|
|
/> |
|
|
); |
|
|
); |
|
|
} else if (netInfo.isInternetReachable) { |
|
|
|
|
|
|
|
|
} else { |
|
|
if (global.formsSockets === undefined) |
|
|
if (global.formsSockets === undefined) |
|
|
global.formsSockets = useFiltering(global.location || global.defaultLocation); |
|
|
global.formsSockets = useFiltering(global.location || global.defaultLocation); |
|
|
|
|
|
|
|
@ -83,5 +82,5 @@ export default function App() { |
|
|
</CurrentLocationProvider> |
|
|
</CurrentLocationProvider> |
|
|
</AuthContext.Provider> |
|
|
</AuthContext.Provider> |
|
|
); |
|
|
); |
|
|
} else return <NoInternetConnectionScreen />; |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |