reduced Searched Location count to 1

This commit is contained in:
Abhinav-grd 2021-05-20 13:55:24 +05:30
parent 308246d073
commit d85e6dd741

View file

@ -16,7 +16,7 @@ export async function searchLocation(
`https://api.mapbox.com/geocoding/v5/mapbox.places/${encodeURI(
location
)}.json`,
{ access_token: getMapboxToken(), limit: 3 }
{ access_token: getMapboxToken(), limit: 1 }
);
return resp.data.features.length > 0 && resp.data.features[0].bbox;
}