import { LatLng } from 'leaflet' import useFetch from './useFetch' import { composeTrashboxURL } from '../../api/trashbox' import { isTrashboxResponse } from '../../api/trashbox/types' const useTrashboxes = (position: LatLng) => { return useFetch( composeTrashboxURL(position), 'GET', true, (data) => data, isTrashboxResponse, [] ) } export default useTrashboxes