aboutsummaryrefslogtreecommitdiff
path: root/modern/src/DeviceList.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2020-03-25 00:31:37 -0700
committerGitHub <noreply@github.com>2020-03-25 00:31:37 -0700
commitb10607f96ad72f5f971fbd867eeeeb86380f79cb (patch)
tree81b7a13c0c3fc4da12182ee20518f021406def9b /modern/src/DeviceList.js
parent78d69f50595e058a08f3eaaa47fd7c3745fa1266 (diff)
parent37f8b1cd81614ed9281647b326a30d58123c5942 (diff)
downloadtrackermap-web-b10607f96ad72f5f971fbd867eeeeb86380f79cb.tar.gz
trackermap-web-b10607f96ad72f5f971fbd867eeeeb86380f79cb.tar.bz2
trackermap-web-b10607f96ad72f5f971fbd867eeeeb86380f79cb.zip
Merge pull request #772 from dt-ap/experiment/redux-toolkit
Experimental: Use Redux Toolkit
Diffstat (limited to 'modern/src/DeviceList.js')
-rw-r--r--modern/src/DeviceList.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/modern/src/DeviceList.js b/modern/src/DeviceList.js
index 03c5126c..235ba229 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';
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() {