aboutsummaryrefslogtreecommitdiff
path: root/modern/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'modern/src/common')
-rw-r--r--modern/src/common/components/PositionValue.js3
-rw-r--r--modern/src/common/util/formatter.js11
2 files changed, 0 insertions, 14 deletions
diff --git a/modern/src/common/components/PositionValue.js b/modern/src/common/components/PositionValue.js
index cc2046da..58841939 100644
--- a/modern/src/common/components/PositionValue.js
+++ b/modern/src/common/components/PositionValue.js
@@ -18,7 +18,6 @@ import {
formatVoltage,
formatVolume,
formatConsumption,
- formatDriverUniqueId,
} from '../util/formatter';
import { useAttributePreference, usePreference } from '../util/preferences';
import { useTranslation } from './LocalizationProvider';
@@ -82,8 +81,6 @@ const PositionValue = ({ position, property, attribute }) => {
return value != null ? formatDistance(value, distanceUnit, t) : '';
case 'hours':
return value != null ? formatNumericHours(value, t) : '';
- case 'driverUniqueId':
- return value != null ? formatDriverUniqueId(value) : '';
default:
if (typeof value === 'number') {
return formatNumber(value);
diff --git a/modern/src/common/util/formatter.js b/modern/src/common/util/formatter.js
index 792a4ef0..0f7d2cc8 100644
--- a/modern/src/common/util/formatter.js
+++ b/modern/src/common/util/formatter.js
@@ -1,4 +1,3 @@
-import { useSelector } from 'react-redux';
import moment from 'moment';
import {
altitudeFromMeters,
@@ -69,16 +68,6 @@ export const formatNumericHours = (value, t) => {
return `${hours} ${t('sharedHourAbbreviation')} ${minutes} ${t('sharedMinuteAbbreviation')}`;
};
-export const formatDriverUniqueId = (value) => {
- const drivers = useSelector((state) => state.drivers.items);
- let driverId = `${value}`;
- const storedDriver = Object.values(drivers).find((d) => d.uniqueId === driverId);
- if (storedDriver) {
- driverId += ` (${storedDriver.name})`;
- }
- return driverId;
-};
-
export const formatCoordinate = (key, value, unit) => {
let hemisphere;
let degrees;