mirror of
https://github.com/CompassConnections/Compass.git
synced 2026-04-27 10:01:00 -04:00
Upgrade geodb plan to increase radius and page limit (#14)
* Upgrade geodb plan to increase radius and page limit * Speed location debounce
This commit is contained in:
@@ -2,8 +2,7 @@ import {APIHandler} from './helpers/endpoint'
|
||||
import {geodbFetch} from "common/geodb";
|
||||
|
||||
const searchNearCityMain = async (cityId: string, radius: number) => {
|
||||
// Limit to 10 cities for now for free plan, was 100 before (may need to buy plan)
|
||||
const endpoint = `/cities/${cityId}/nearbyCities?radius=${radius}&offset=0&sort=-population&limit=10`
|
||||
const endpoint = `/cities/${cityId}/nearbyCities?radius=${radius}&offset=0&sort=-population&limit=100`
|
||||
return await geodbFetch(endpoint)
|
||||
}
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ export const useCitySearch = () => {
|
||||
} else {
|
||||
fetchData()
|
||||
}
|
||||
}, 1000)
|
||||
}, 400)
|
||||
|
||||
return () => {
|
||||
clearTimeout(debounce)
|
||||
|
||||
Reference in New Issue
Block a user