summaryrefslogtreecommitdiff
path: root/src/containers/app/sidebars/topology/rack/EmptySlotContainer.js
blob: 527805a2e0f913532498db023d446e58e37ff5be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import { connect } from "react-redux";
import { addMachine } from "../../../../../actions/topology/rack";
import EmptySlotComponent from "../../../../../components/app/sidebars/topology/rack/EmptySlotComponent";

const mapStateToProps = state => {
  return {
    inSimulation: state.currentExperimentId !== -1
  };
};

const mapDispatchToProps = (dispatch, ownProps) => {
  return {
    onAdd: () => dispatch(addMachine(ownProps.position))
  };
};

const EmptySlotContainer = connect(mapStateToProps, mapDispatchToProps)(
  EmptySlotComponent
);

export default EmptySlotContainer;