Added address to dispose trashbox request

styling fixes
This commit is contained in:
2023-08-08 19:20:00 +03:00
parent d9925647c6
commit 864f5a040c
7 changed files with 34 additions and 31 deletions

View File

@ -2,7 +2,7 @@ import { composeDisposeBody } from '.'
import { isObject } from '../../utils/types'
import { Trashbox } from '../trashbox/types'
type TrashboxDispose = Omit<Trashbox, 'Categories' | 'Address'> & { Category: string }
type TrashboxDispose = Omit<Trashbox, 'Categories'> & { Category: string }
type DisposeParams = Parameters<typeof composeDisposeBody>

View File

@ -2,11 +2,13 @@ import { LatLng } from 'leaflet'
import { API_URL } from '../../config'
import { Trashbox, TrashboxResponse } from './types'
import { Category } from '../../assets/category'
const composeTrashboxURL = (position: LatLng) => (
const composeTrashboxURL = (position: LatLng, category: Category) => (
API_URL + '/trashbox?' + new URLSearchParams({
lat: position.lat.toString(),
lng: position.lng.toString(),
category: category,
}).toString()
)