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

const mapStateToProps = (state, ownProps) => {
    return {
        unitIds:
            state.objects.machine[
                state.objects.rack[
                    state.objects.tile[state.interactionLevel.tileId].rackId
                    ].machineIds[state.interactionLevel.position - 1]
                ][ownProps.unitType + 'Ids'],
    }
}

const UnitListContainer = connect(mapStateToProps)(UnitListComponent)

export default UnitListContainer