import t from './common/localization' import React from 'react'; import { useSelector } from 'react-redux'; import formatter from './common/formatter'; const StatusView = (props) => { const device = useSelector(state => state.devices.items[props.deviceId]); const position = useSelector(state => state.positions.items[props.deviceId]); return ( <> {t('deviceStatus')}: {formatter(device.status, 'status')}
{t('positionSpeed')}: {formatter(position.speed, 'speed')}
{t('positionCourse')}: {formatter(position.course, 'course')}
{t('positionDistance')}: {formatter(position.attributes.totalDistance, 'distance')}
); }; export default StatusView;