@ -4,15 +4,15 @@ import useFetch from './useFetch'
|
||||
import { composeTrashboxURL } from '../../api/trashbox'
|
||||
import { isTrashboxResponse } from '../../api/trashbox/types'
|
||||
|
||||
const useTrashboxes = (position: LatLng) => {
|
||||
return useFetch(
|
||||
const useTrashboxes = (position: LatLng) =>
|
||||
useFetch(
|
||||
composeTrashboxURL(position),
|
||||
'GET',
|
||||
true,
|
||||
(data) => data,
|
||||
isTrashboxResponse,
|
||||
(data) => data,
|
||||
[]
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
export default useTrashboxes
|
||||
|
Reference in New Issue
Block a user