aboutsummaryrefslogtreecommitdiff
path: root/modern/src/main/DevicesList.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-05-27 09:15:49 -0700
committerAnton Tananaev <anton@traccar.org>2022-05-27 09:15:49 -0700
commit5f1de2f30ffcc80c75a4a3256340a56d822dc1fa (patch)
tree353ca310b7e42c11ec1a1ab8f40974224b3378ee /modern/src/main/DevicesList.js
parent8f7387f026c8b983f8896626c1db689e23e148b9 (diff)
downloadtrackermap-web-5f1de2f30ffcc80c75a4a3256340a56d822dc1fa.tar.gz
trackermap-web-5f1de2f30ffcc80c75a4a3256340a56d822dc1fa.tar.bz2
trackermap-web-5f1de2f30ffcc80c75a4a3256340a56d822dc1fa.zip
Better map icon handling
Diffstat (limited to 'modern/src/main/DevicesList.js')
-rw-r--r--modern/src/main/DevicesList.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/modern/src/main/DevicesList.js b/modern/src/main/DevicesList.js
index 022da390..108c3397 100644
--- a/modern/src/main/DevicesList.js
+++ b/modern/src/main/DevicesList.js
@@ -18,7 +18,6 @@ import BatteryCharging20Icon from '@mui/icons-material/BatteryCharging20';
import FlashOnIcon from '@mui/icons-material/FlashOn';
import FlashOffIcon from '@mui/icons-material/FlashOff';
import ErrorIcon from '@mui/icons-material/Error';
-
import moment from 'moment';
import { devicesActions } from '../store';
import { useEffectAsync } from '../reactHelper';
@@ -26,6 +25,7 @@ import {
formatAlarm, formatBoolean, formatPercentage, formatStatus, getStatusColor,
} from '../common/util/formatter';
import { useTranslation } from '../common/components/LocalizationProvider';
+import { mapIcons } from '../map/core/preloadImages';
const useStyles = makeStyles((theme) => ({
list: {
@@ -86,7 +86,7 @@ const DeviceRow = ({ data, index, style }) => {
<ListItem button key={item.id} className={classes.listItem} onClick={() => dispatch(devicesActions.select(item.id))}>
<ListItemAvatar>
<Avatar>
- <img className={classes.icon} src={`images/icon/${item.category || 'default'}.svg`} alt="" />
+ <img className={classes.icon} src={mapIcons[item.category || 'default']} alt="" />
</Avatar>
</ListItemAvatar>
<ListItemText