aboutsummaryrefslogtreecommitdiff
path: root/modern/src/reports/StopReportPage.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2020-11-14 16:13:58 -0800
committerAnton Tananaev <anton.tananaev@gmail.com>2020-11-14 16:13:58 -0800
commitec8fed96e394ff252c7e98bed1ca2e5322ad650a (patch)
tree447c6e6946935047763bc2dd8cb50ae8c5ea4fbe /modern/src/reports/StopReportPage.js
parentbcef1fda0756f0ef1afbb53c26f6cbab4dcfeba8 (diff)
downloadetbsa-traccar-web-ec8fed96e394ff252c7e98bed1ca2e5322ad650a.tar.gz
etbsa-traccar-web-ec8fed96e394ff252c7e98bed1ca2e5322ad650a.tar.bz2
etbsa-traccar-web-ec8fed96e394ff252c7e98bed1ca2e5322ad650a.zip
More cleanup
Diffstat (limited to 'modern/src/reports/StopReportPage.js')
-rw-r--r--modern/src/reports/StopReportPage.js11
1 files changed, 3 insertions, 8 deletions
diff --git a/modern/src/reports/StopReportPage.js b/modern/src/reports/StopReportPage.js
index c9e50c8..751909d 100644
--- a/modern/src/reports/StopReportPage.js
+++ b/modern/src/reports/StopReportPage.js
@@ -9,21 +9,16 @@ import { useAttributePreference } from '../common/preferences';
const ReportFilterForm = ({ onResult }) => {
const handleSubmit = async (deviceId, from, to) => {
- const query = new URLSearchParams({
- deviceId,
- from: from.toISOString(),
- to: to.toISOString(),
- });
+ const query = new URLSearchParams({ deviceId, from, to });
const response = await fetch(`/api/reports/stops?${query.toString()}`, { headers: { Accept: 'application/json' } });
if (response.ok) {
onResult(await response.json());
}
}
return <ReportFilter handleSubmit={handleSubmit} />;
-}
+};
const StopReportPage = () => {
-
const distanceUnit = useAttributePreference('distanceUnit');
const [items, setItems] = useState([]);
@@ -57,6 +52,6 @@ const StopReportPage = () => {
</TableContainer>
</ReportLayoutPage>
);
-}
+};
export default StopReportPage;