Added address to dispose trashbox request
styling fixes
This commit is contained in:
@ -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>
|
||||
|
||||
|
@ -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()
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user