aboutsummaryrefslogtreecommitdiff
path: root/modern/src/DevicesList.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2021-09-03 09:41:20 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2021-09-03 09:41:20 -0700
commit6ac6ceaed16b2ae5ef58ba599d24a868ac2f816a (patch)
treeedd24c732d6439e6fb3c03f021d9f0842468d474 /modern/src/DevicesList.js
parent105e4ec887e249ec47db83095504012bad22df80 (diff)
downloadtrackermap-web-6ac6ceaed16b2ae5ef58ba599d24a868ac2f816a.tar.gz
trackermap-web-6ac6ceaed16b2ae5ef58ba599d24a868ac2f816a.tar.bz2
trackermap-web-6ac6ceaed16b2ae5ef58ba599d24a868ac2f816a.zip
Finish migrations
Diffstat (limited to 'modern/src/DevicesList.js')
-rw-r--r--modern/src/DevicesList.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/modern/src/DevicesList.js b/modern/src/DevicesList.js
index cbf3a0a9..cea7c38c 100644
--- a/modern/src/DevicesList.js
+++ b/modern/src/DevicesList.js
@@ -19,6 +19,7 @@ import EditCollectionView from './EditCollectionView';
import { useEffectAsync } from './reactHelper';
import { formatPosition } from './common/formatter';
import { getDevices, getPosition } from './common/selectors';
+import { useTranslation } from './LocalizationProvider';
const useStyles = makeStyles((theme) => ({
list: {
@@ -83,6 +84,7 @@ const getBatteryStatus = (batteryLevel) => {
const DeviceRow = ({ data, index, style }) => {
const classes = useStyles();
const dispatch = useDispatch();
+ const t = useTranslation();
const { items } = data;
const item = items[index];
@@ -109,7 +111,7 @@ const DeviceRow = ({ data, index, style }) => {
{position.attributes.hasOwnProperty('batteryLevel') && (
<Grid item container xs alignItems="center" alignContent="center">
<Grid item>
- <span className={classes.batteryText}>{formatPosition(position.attributes.batteryLevel, 'batteryLevel')}</span>
+ <span className={classes.batteryText}>{formatPosition(position.attributes.batteryLevel, 'batteryLevel', t)}</span>
</Grid>
<Grid item>
<BatteryFullIcon className={classes[getBatteryStatus(position.attributes.batteryLevel)]} />