From cfb788f1f8738b0b29ffb6d27ca8790f1ef7b49a Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sat, 14 Nov 2020 16:16:51 -0800 Subject: Formatting --- modern/src/reports/RouteReportPage.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'modern/src/reports/RouteReportPage.js') diff --git a/modern/src/reports/RouteReportPage.js b/modern/src/reports/RouteReportPage.js index d2a1b68..7ff5d40 100644 --- a/modern/src/reports/RouteReportPage.js +++ b/modern/src/reports/RouteReportPage.js @@ -10,7 +10,7 @@ const ReportFilterForm = ({ onResult }) => { const handleSubmit = async (deviceId, from, to) => { const query = new URLSearchParams({ deviceId, from, to }); const response = await fetch(`/api/reports/route?${query.toString()}`, { headers: { Accept: 'application/json' } }); - if(response.ok) { + if (response.ok) { onResult(await response.json()); } } @@ -18,6 +18,7 @@ const ReportFilterForm = ({ onResult }) => { }; const RouteReportPage = () => { + const [items, setItems] = useState([]); return ( -- cgit v1.2.3