summaryrefslogtreecommitdiff
path: root/frontend/src/containers/app/sidebars/topology/rack/EmptySlotContainer.js
blob: 07439dc94754238c4db064522149c0211a3e4b00 (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