diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2020-09-27 21:54:39 -0700 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2020-09-27 21:54:39 -0700 |
commit | 236b10503612706ed914678d942ac604f2973f47 (patch) | |
tree | e557381dbdc721002346a0fc64b1a679280fa3f1 /modern/src/StatusView.js | |
parent | 96af05dbf2171c4e194cf67c3c93d134ef467e50 (diff) | |
download | trackermap-web-236b10503612706ed914678d942ac604f2973f47.tar.gz trackermap-web-236b10503612706ed914678d942ac604f2973f47.tar.bz2 trackermap-web-236b10503612706ed914678d942ac604f2973f47.zip |
Implement notification settings
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 /></> } </> ); |