diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2020-03-21 10:11:33 -0700 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2020-03-21 10:11:33 -0700 |
commit | 95cbf0277936012c01e46c2a3625d5bdeebb48ae (patch) | |
tree | b35fffacbcd47352f0433d2e83931c9e3dbde006 /modern/src/DeviceList.js | |
parent | e8e42979e8dc4fbeb5ced188bfa8a27b07913487 (diff) | |
download | trackermap-web-95cbf0277936012c01e46c2a3625d5bdeebb48ae.tar.gz trackermap-web-95cbf0277936012c01e46c2a3625d5bdeebb48ae.tar.bz2 trackermap-web-95cbf0277936012c01e46c2a3625d5bdeebb48ae.zip |
Add list divider
Diffstat (limited to 'modern/src/DeviceList.js')
-rw-r--r-- | modern/src/DeviceList.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modern/src/DeviceList.js b/modern/src/DeviceList.js index c21fc0a1..c500242f 100644 --- a/modern/src/DeviceList.js +++ b/modern/src/DeviceList.js @@ -10,6 +10,7 @@ import LocationOnIcon from '@material-ui/icons/LocationOn'; import ListItemSecondaryAction from '@material-ui/core/ListItemSecondaryAction'; import IconButton from '@material-ui/core/IconButton'; import MoreVertIcon from '@material-ui/icons/MoreVert'; +import Divider from '@material-ui/core/Divider'; const mapStateToProps = state => ({ devices: state.devices @@ -27,7 +28,7 @@ class DeviceList extends Component { } render() { - const devices = this.props.devices.map(device => + const devices = this.props.devices.map((device, index, list) => <Fragment key={device.id.toString()}> <ListItem button> <ListItemAvatar> @@ -42,6 +43,7 @@ class DeviceList extends Component { </IconButton> </ListItemSecondaryAction> </ListItem> + {index < list.length - 1 ? <Divider /> : null} </Fragment> ); |