diff options
Diffstat (limited to 'modern/src/reports/StopReportPage.js')
-rw-r--r-- | modern/src/reports/StopReportPage.js | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/modern/src/reports/StopReportPage.js b/modern/src/reports/StopReportPage.js index d44e2046..00c8a41b 100644 --- a/modern/src/reports/StopReportPage.js +++ b/modern/src/reports/StopReportPage.js @@ -43,10 +43,8 @@ const StopReportPage = () => { const [items, setItems] = useState([]); const [selectedItem, setSelectedItem] = useState(null); - const handleSubmit = useCatch(async (deviceId, from, to, mail, headers) => { - const query = new URLSearchParams({ - deviceId, from, to, mail, - }); + const handleSubmit = useCatch(async ({ deviceId, from, to, mail, headers }) => { + const query = new URLSearchParams({ deviceId, from, to, mail }); const response = await fetch(`/api/reports/stops?${query.toString()}`, { headers }); if (response.ok) { const contentType = response.headers.get('content-type'); |