diff options
author | Anton Tananaev <anton@traccar.org> | 2022-07-20 16:25:40 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2022-07-20 16:25:40 -0700 |
commit | 3d10ccbdb13ef1d54d114e6df4fd2fdf75d9de20 (patch) | |
tree | d063cb9ae37d3b939f9731d1ae44557c90bb3d73 /modern/src/common/components/PositionValue.js | |
parent | 29365a7bf12331ecee5f53eca83cf141a2e8d1f9 (diff) | |
download | trackermap-web-3d10ccbdb13ef1d54d114e6df4fd2fdf75d9de20.tar.gz trackermap-web-3d10ccbdb13ef1d54d114e6df4fd2fdf75d9de20.tar.bz2 trackermap-web-3d10ccbdb13ef1d54d114e6df4fd2fdf75d9de20.zip |
Better hours formatting
Diffstat (limited to 'modern/src/common/components/PositionValue.js')
-rw-r--r-- | modern/src/common/components/PositionValue.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modern/src/common/components/PositionValue.js b/modern/src/common/components/PositionValue.js index 6dd1f50d..a851c886 100644 --- a/modern/src/common/components/PositionValue.js +++ b/modern/src/common/components/PositionValue.js @@ -3,7 +3,7 @@ import { useSelector } from 'react-redux'; import { Link } from '@mui/material'; import { Link as RouterLink } from 'react-router-dom'; import { - formatAlarm, formatAltitude, formatBoolean, formatCoordinate, formatCourse, formatDistance, formatNumber, formatPercentage, formatSpeed, formatTime, + formatAlarm, formatAltitude, formatBoolean, formatCoordinate, formatCourse, formatDistance, formatNumber, formatNumericHours, formatPercentage, formatSpeed, formatTime, } from '../util/formatter'; import { useAttributePreference, usePreference } from '../util/preferences'; import { useTranslation } from './LocalizationProvider'; @@ -42,7 +42,7 @@ const PositionValue = ({ position, property, attribute }) => { case 'altitude': return formatAltitude(value, altitudeUnit, t); case 'batteryLevel': - return formatPercentage(value); + return formatPercentage(value, t); case 'alarm': return formatAlarm(value, t); case 'odometer': @@ -50,7 +50,7 @@ const PositionValue = ({ position, property, attribute }) => { case 'totalDistance': return formatDistance(value, distanceUnit, t); case 'hours': - return formatNumber(value / 1000); + return formatNumericHours(value, t); default: if (typeof value === 'number') { return formatNumber(value); |