Returned setData from useFetch

Fixed imports
Related to #19
This commit is contained in:
2023-07-15 11:07:12 +03:00
parent 48a48f9364
commit 2ce0e5b65d
5 changed files with 20 additions and 15 deletions

View File

@ -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