import { LatLng } from 'leaflet' import { useFetch } from '../' import { composeOsmAddressURL, processOsmAddress } from '../../api/osmAddress' import { isOsmAddressResponse } from '../../api/osmAddress/types' const useOsmAddresses = (addressPosition: LatLng) => ( useFetch( composeOsmAddressURL(addressPosition), 'GET', false, isOsmAddressResponse, processOsmAddress, '' ) ) export default useOsmAddresses