summaryrefslogtreecommitdiff
path: root/opendc-web/opendc-web-ui/src/containers/app/sidebars/topology/rack/EmptySlotContainer.js
blob: 5bb2c784ab2d956cae8c2ab7d47c8c1115b9fcc4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
import React from 'react'
import { useDispatch } from 'react-redux'
import { addMachine } from '../../../../../actions/topology/rack'
import EmptySlotComponent from '../../../../../components/app/sidebars/topology/rack/EmptySlotComponent'

const EmptySlotContainer = (props) => {
    const dispatch = useDispatch()
    const onAdd = () => dispatch(addMachine(props.position))
    return <EmptySlotComponent {...props} onAdd={onAdd} />
}

export default EmptySlotContainer