aboutsummaryrefslogtreecommitdiff
path: root/modern/src/map
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-05-01 15:29:23 -0700
committerAnton Tananaev <anton@traccar.org>2022-05-01 15:29:23 -0700
commit4ca85e42f074641ab83504e783603640da7478db (patch)
tree07376d23560fe7034890de679e44c96484775679 /modern/src/map
parentaf6b60f85ba09a9d1a258cf9d1b6b61d4b8e4fe5 (diff)
downloadtrackermap-web-4ca85e42f074641ab83504e783603640da7478db.tar.gz
trackermap-web-4ca85e42f074641ab83504e783603640da7478db.tar.bz2
trackermap-web-4ca85e42f074641ab83504e783603640da7478db.zip
Fix lint issues
Diffstat (limited to 'modern/src/map')
-rw-r--r--modern/src/map/StatusCard.js25
1 files changed, 13 insertions, 12 deletions
diff --git a/modern/src/map/StatusCard.js b/modern/src/map/StatusCard.js
index 47f7724d..d19651ca 100644
--- a/modern/src/map/StatusCard.js
+++ b/modern/src/map/StatusCard.js
@@ -11,7 +11,9 @@ import EditIcon from '@material-ui/icons/Edit';
import DeleteIcon from '@material-ui/icons/Delete';
import { useTranslation } from '../LocalizationProvider';
-import { formatDistance, formatPosition, formatSpeed, formatStatus } from '../common/formatter';
+import {
+ formatDistance, formatPosition, formatSpeed, formatStatus,
+} from '../common/formatter';
import RemoveDialog from '../RemoveDialog';
import { useAttributePreference } from '../common/preferences';
@@ -54,7 +56,7 @@ const StatusRow = ({ name, value }) => {
</TableCell>
</TableRow>
);
-}
+};
const StatusCard = ({ deviceId, onClose }) => {
const classes = useStyles();
@@ -71,23 +73,23 @@ const StatusCard = ({ deviceId, onClose }) => {
return (
<>
- {device &&
+ {device && (
<Card>
<CardHeader
- avatar={
+ avatar={(
<Avatar>
<img className={classes.icon} src={`images/icon/${device.category || 'default'}.svg`} alt="" />
</Avatar>
- }
- action={
+ )}
+ action={(
<IconButton onClick={onClose}>
<CloseIcon />
</IconButton>
- }
+ )}
title={device.name}
subheader={formatStatus(device.status, t)}
/>
- {position &&
+ {position && (
<CardContent>
<TableContainer>
<Table size="small" classes={{ root: classes.table }}>
@@ -96,14 +98,13 @@ const StatusCard = ({ deviceId, onClose }) => {
<StatusRow name={t('positionBattery')} value={formatSpeed(position.speed, speedUnit, t)} />
{position.attributes.odometer
? <StatusRow name={t('positionOdometer')} value={formatDistance(position.attributes.odometer, distanceUnit, t)} />
- : <StatusRow name={t('deviceTotalDistance')} value={formatDistance(position.attributes.totalDistance, distanceUnit, t)} />
- }
+ : <StatusRow name={t('deviceTotalDistance')} value={formatDistance(position.attributes.totalDistance, distanceUnit, t)} />}
<StatusRow name={t('positionCourse')} value={formatPosition(position.course, 'course', t)} />
</TableBody>
</Table>
</TableContainer>
</CardContent>
- }
+ )}
<CardActions disableSpacing>
<Button onClick={() => history.push(`/position/${position.id}`)} disabled={!position} color="secondary">
{t('sharedInfoTitle')}
@@ -122,7 +123,7 @@ const StatusCard = ({ deviceId, onClose }) => {
</IconButton>
</CardActions>
</Card>
- }
+ )}
<RemoveDialog
open={removeDialogShown}
endpoint="devices"