Skip to Content
⚠️Active Development Notice: TimeTiles is under active development. Information may be placeholder content or not up-to-date.

web


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?

optional result: object

latitude

latitude: number

longitude

longitude: number

confidence

confidence: number

normalizedAddress

normalizedAddress: string

error?

optional error: string


TestResults

Properties

google?

optional google: TestResult

nominatim?

optional nominatim: TestResult

opencage?

optional opencage: 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