diff options
Diffstat (limited to 'modern/src/StatusView.js')
-rw-r--r-- | modern/src/StatusView.js | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/modern/src/StatusView.js b/modern/src/StatusView.js index 756a95a5..61fd1504 100644 --- a/modern/src/StatusView.js +++ b/modern/src/StatusView.js @@ -1,7 +1,7 @@ import t from './common/localization' import React from 'react'; import { useSelector } from 'react-redux'; -import formatter from './common/formatter'; +import { formatPosition } from './common/formatter'; const StatusView = (props) => { const device = useSelector(state => state.devices.items[props.deviceId]); @@ -9,13 +9,13 @@ const StatusView = (props) => { return ( <> - <b>{t('deviceStatus')}:</b> {formatter(device.status, 'status')}<br /> - <b>{t('sharedLocation')}:</b> {formatter(position, 'latitude')} {formatter(position, 'longitude')}<br /> - <b>{t('positionSpeed')}:</b> {formatter(position.speed, 'speed')}<br /> - <b>{t('positionCourse')}:</b> {formatter(position.course, 'course')}<br /> - <b>{t('positionDistance')}:</b> {formatter(position.attributes.totalDistance, 'distance')}<br /> + <b>{t('deviceStatus')}:</b> {formatPosition(device.status, 'status')}<br /> + <b>{t('sharedLocation')}:</b> {formatPosition(position, 'latitude')} {formatPosition(position, 'longitude')}<br /> + <b>{t('positionSpeed')}:</b> {formatPosition(position.speed, 'speed')}<br /> + <b>{t('positionCourse')}:</b> {formatPosition(position.course, 'course')}<br /> + <b>{t('positionDistance')}:</b> {formatPosition(position.attributes.totalDistance, 'distance')}<br /> {position.attributes.batteryLevel && - <><b>{t('positionBattery')}:</b> {formatter(position.attributes.batteryLevel, 'batteryLevel')}<br /></> + <><b>{t('positionBattery')}:</b> {formatPosition(position.attributes.batteryLevel, 'batteryLevel')}<br /></> } </> ); |