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:
Martin Braquet
2025-10-12 15:58:52 +02:00
committed by GitHub
parent a32c099cc1
commit 6c6c1cc90a
2 changed files with 2 additions and 3 deletions

View File

@@ -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)
}

View File

@@ -113,7 +113,7 @@ export const useCitySearch = () => {
} else {
fetchData()
}
}, 1000)
}, 400)
return () => {
clearTimeout(debounce)