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

const mapStateToProps = state => {
    return {
        inSimulation: state.currentExperimentId !== -1,
        machineId: state.objects.rack[state.objects.tile[state.interactionLevel.tileId].objectId]
            .machineIds[state.interactionLevel.position - 1],
    };
};

const MachineSidebarContainer = connect(
    mapStateToProps
)(MachineSidebarComponent);

export default MachineSidebarContainer;