mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2026-03-01 12:44:17 +00:00
fixed linting
This commit is contained in:
parent
68aa70ec0d
commit
3b61d68ad6
@ -24,7 +24,7 @@ interface GeocodeResponse {
|
||||
|
||||
export function useReverseGeocode(
|
||||
coordinates?: [number, number] | null,
|
||||
enabled: boolean = true,
|
||||
enabled = true,
|
||||
accuracy: 'municipality' | 'street' | 'house_number' = 'municipality',
|
||||
) {
|
||||
const [address, setAddress] = useState('')
|
||||
@ -59,7 +59,7 @@ export function useReverseGeocode(
|
||||
|
||||
if (data.features && data.features.length > 0) {
|
||||
const props = data.features[0].properties
|
||||
const municipality = props.city || props.town || props.village
|
||||
const municipality = props.city ?? props.town ?? props.village
|
||||
|
||||
let addressString = ''
|
||||
|
||||
@ -103,4 +103,4 @@ export function useReverseGeocode(
|
||||
}, [coordinates, enabled, accuracy])
|
||||
|
||||
return { address, loading, error }
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user