diff options
author | ditoaugusta <dt_ap@ymail.com> | 2020-03-24 15:04:52 +0700 |
---|---|---|
committer | ditoaugusta <dt_ap@ymail.com> | 2020-03-24 15:04:52 +0700 |
commit | 2f8ae58f4f5cde892b4b6981a83a37edc1422a2c (patch) | |
tree | f9354abc103d4dde4f98effbdf46739fefe4ac1f /modern/src/DeviceList.js | |
parent | 78d69f50595e058a08f3eaaa47fd7c3745fa1266 (diff) | |
download | trackermap-web-2f8ae58f4f5cde892b4b6981a83a37edc1422a2c.tar.gz trackermap-web-2f8ae58f4f5cde892b4b6981a83a37edc1422a2c.tar.bz2 trackermap-web-2f8ae58f4f5cde892b4b6981a83a37edc1422a2c.zip |
experiment: redux toolkit
Diffstat (limited to 'modern/src/DeviceList.js')
-rw-r--r-- | modern/src/DeviceList.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modern/src/DeviceList.js b/modern/src/DeviceList.js index 03c5126c..88428007 100644 --- a/modern/src/DeviceList.js +++ b/modern/src/DeviceList.js @@ -10,15 +10,15 @@ 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'; -import { selectDevice } from './actions'; +import { devicesActions } from 'store/modules'; const mapStateToProps = state => ({ - devices: Array.from(state.devices.values()) + devices: Object.values(state.devices.items) }); class DeviceList extends Component { handleClick(device) { - this.props.dispatch(selectDevice(device)); + this.props.dispatch(devicesActions.select(device)); } render() { |