web / lib/hooks/use-geocoding-test
lib/hooks/use-geocoding-test
Hook for testing geocoding providers from the Payload admin panel.
Uses plain useState/useCallback instead of React Query because the Payload admin panel has no QueryClientProvider.
Interfaces
TestResult
Properties
success
success:
boolean
result?
optionalresult:object
latitude
latitude:
number
longitude
longitude:
number
confidence
confidence:
number
normalizedAddress
normalizedAddress:
string
error?
optionalerror:string
TestResults
Properties
google?
optionalgoogle:TestResult
nominatim?
optionalnominatim:TestResult
opencage?
optionalopencage:TestResult
Functions
useGeocodingTest()
useGeocodingTest():
object
Returns
object
mutate()
mutate: (
address) =>Promise<void>
Parameters
address
string
Returns
Promise<void>
isPending
isPending:
boolean
data
data:
TestResults|null
error
error:
string|null
Last updated on