|
@ -14,7 +14,9 @@ export default function useLocation( |
|
|
|
|
|
|
|
|
const { |
|
|
const { |
|
|
coords: { latitude, longitude }, |
|
|
coords: { latitude, longitude }, |
|
|
} = await Location.getLastKnownPositionAsync(); |
|
|
|
|
|
|
|
|
} = await Location.getCurrentPositionAsync({ |
|
|
|
|
|
accuracy: Location.Accuracy.Highest, |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
setLocation({ latitude, longitude }); |
|
|
setLocation({ latitude, longitude }); |
|
|
} catch (error) { |
|
|
} catch (error) { |
|
|