From 8ee49a58332b1e7d11262e006e42098882b9a87b Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sat, 28 May 2022 11:32:39 -0700 Subject: Fix route report --- modern/src/reports/RouteReportPage.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'modern') diff --git a/modern/src/reports/RouteReportPage.js b/modern/src/reports/RouteReportPage.js index 33bc9350..5796e80c 100644 --- a/modern/src/reports/RouteReportPage.js +++ b/modern/src/reports/RouteReportPage.js @@ -28,10 +28,8 @@ const RouteReportPage = () => { 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/route?${query.toString()}`, { headers }); if (response.ok) { const contentType = response.headers.get('content-type'); -- cgit v1.2.3