aboutsummaryrefslogtreecommitdiff
path: root/modern/src/components/PositionValue.js
diff options
context:
space:
mode:
Diffstat (limited to 'modern/src/components/PositionValue.js')
-rw-r--r--modern/src/components/PositionValue.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/modern/src/components/PositionValue.js b/modern/src/components/PositionValue.js
index fd331a7d..5a07959d 100644
--- a/modern/src/components/PositionValue.js
+++ b/modern/src/components/PositionValue.js
@@ -1,17 +1,17 @@
import React, { useEffect, useState } from 'react';
import { Link } from '@material-ui/core';
import { Link as RouterLink } from 'react-router-dom';
-import { useSelector } from 'react-redux';
import {
formatAlarm, formatBoolean, formatCoordinate, formatCourse, formatDistance, formatNumber, formatPercentage, formatSpeed, formatTime,
} from '../common/formatter';
import { useAttributePreference, usePreference } from '../common/preferences';
import { useTranslation } from '../LocalizationProvider';
+import { useAdministrator } from '../common/permissions';
const PositionValue = ({ position, property, attribute }) => {
const t = useTranslation();
- const admin = useSelector((state) => state.session.user?.administrator);
+ const admin = useAdministrator();
const key = property || attribute;
const value = property ? position[property] : position.attributes[attribute];