diff options
Diffstat (limited to 'modern/src/reports/ChartReportPage.js')
-rw-r--r-- | modern/src/reports/ChartReportPage.js | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/modern/src/reports/ChartReportPage.js b/modern/src/reports/ChartReportPage.js index ce50819b..ceb2361b 100644 --- a/modern/src/reports/ChartReportPage.js +++ b/modern/src/reports/ChartReportPage.js @@ -34,10 +34,8 @@ const ChartReportPage = () => { const maxValue = Math.max(...values); const valueRange = maxValue - minValue; - 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 positions = await response.json(); |