Unverified Commit 3c55e0ce authored by benguedj's avatar benguedj Committed by GitHub
Browse files

fix: 🐛 Corrige le loader sur la carto (access GPS : refused) (#544)

 Closes: #540
parent 7827f6f2
......@@ -17,7 +17,6 @@ interface Props {
postalCode: string;
region: Region;
setFetchedPois: (pois: CartographiePoisFromDB[]) => void;
setIsLoading: (value: boolean) => void;
chooseFilterMessage: () => void;
searchIsReady: boolean;
}
......@@ -27,7 +26,6 @@ const FetchPoisCoords: React.FC<Props> = ({
triggerSearchByGpsCoords,
region,
setFetchedPois,
setIsLoading,
chooseFilterMessage,
searchIsReady,
}) => {
......@@ -94,7 +92,6 @@ const FetchPoisCoords: React.FC<Props> = ({
useEffect(() => {
if (!searchIsReady) {
setIsLoading(false);
return;
}
void searchByGPSCoords();
......
......@@ -57,6 +57,7 @@ const SearchByPostalCode: React.FC<Props> = ({
const { status } = await Location.requestForegroundPermissionsAsync();
if (status !== Location.PermissionStatus.GRANTED) {
showSnackBarWithMessage(Labels.aroundMe.pleaseAllowGeolocation);
setIsLoading(false);
return;
}
......
......@@ -199,7 +199,6 @@ const TabAroundMeScreen: React.FC = () => {
postalCode={postalCodeInput}
region={region}
setFetchedPois={handleFetchedPois}
setIsLoading={setIsLoading}
chooseFilterMessage={() => {
setTimeout(
() => {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment