diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2021-09-03 09:41:20 -0700 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2021-09-03 09:41:20 -0700 |
commit | 6ac6ceaed16b2ae5ef58ba599d24a868ac2f816a (patch) | |
tree | edd24c732d6439e6fb3c03f021d9f0842468d474 /modern/src/reports/RouteReportPage.js | |
parent | 105e4ec887e249ec47db83095504012bad22df80 (diff) | |
download | trackermap-web-6ac6ceaed16b2ae5ef58ba599d24a868ac2f816a.tar.gz trackermap-web-6ac6ceaed16b2ae5ef58ba599d24a868ac2f816a.tar.bz2 trackermap-web-6ac6ceaed16b2ae5ef58ba599d24a868ac2f816a.zip |
Finish migrations
Diffstat (limited to 'modern/src/reports/RouteReportPage.js')
-rw-r--r-- | modern/src/reports/RouteReportPage.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modern/src/reports/RouteReportPage.js b/modern/src/reports/RouteReportPage.js index fe433422..3be2107b 100644 --- a/modern/src/reports/RouteReportPage.js +++ b/modern/src/reports/RouteReportPage.js @@ -32,12 +32,12 @@ const Filter = ({ setItems }) => { }; const RouteReportPage = () => { + const theme = useTheme(); const t = useTranslation(); const distanceUnit = useAttributePreference('distanceUnit'); const speedUnit = useAttributePreference('speedUnit'); const coordinateFormat = usePreference('coordinateFormat'); - const theme = useTheme(); const columns = [{ headerName: t('positionFixTime'), @@ -62,7 +62,7 @@ const RouteReportPage = () => { field: 'speed', type: 'number', width: theme.dimensions.columnWidthString, - valueFormatter: ({ value }) => formatSpeed(value, speedUnit), + valueFormatter: ({ value }) => formatSpeed(value, speedUnit, t), }, { headerName: t('positionAddress'), field: 'address', @@ -74,7 +74,7 @@ const RouteReportPage = () => { type: 'boolean', width: theme.dimensions.columnWidthBoolean, valueGetter: ({ row }) => row.attributes.ignition, - valueFormatter: ({ value }) => formatBoolean(value), + valueFormatter: ({ value }) => formatBoolean(value, t), }, { headerName: t('deviceTotalDistance'), field: 'totalDistance', @@ -82,7 +82,7 @@ const RouteReportPage = () => { hide: true, width: theme.dimensions.columnWidthNumber, valueGetter: ({ row }) => row.attributes.totalDistance, - valueFormatter: ({ value }) => formatDistance(value, distanceUnit), + valueFormatter: ({ value }) => formatDistance(value, distanceUnit, t), }]; const [items, setItems] = useState([]); |