aboutsummaryrefslogtreecommitdiff
path: root/modern/src/common/components/PositionValue.js
diff options
context:
space:
mode:
Diffstat (limited to 'modern/src/common/components/PositionValue.js')
-rw-r--r--modern/src/common/components/PositionValue.js6
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);