summaryrefslogtreecommitdiff
path: root/src/containers/sidebars/topology/machine/UnitListContainer.js
blob: 9aed3f60b9a288a0bd715eca51c00a5494ba7d99 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import {connect} from "react-redux";
import UnitListComponent from "../../../../components/sidebars/topology/machine/UnitListComponent";

const mapStateToProps = (state, ownProps) => {
    return {
        unitIds: state.objects.machine[state.objects.rack[state.objects.tile[state.interactionLevel.tileId].objectId]
            .machineIds[state.interactionLevel.position - 1]][ownProps.unitType + "Ids"],
        inSimulation: state.currentExperimentId !== -1
    };
};

const UnitListContainer = connect(
    mapStateToProps
)(UnitListComponent);

export default UnitListContainer;