From 4ebe2f28ba940aabdaa1f57653fbe86a91582ebd Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Mon, 10 Oct 2022 14:46:09 +0200 Subject: fix(web/ui): Fix UnitInfo popover This change addresses an issue with the topology sidebar where hovering a CPU or GPU would not present the correct information due to bug. --- .../src/components/topologies/sidebar/machine/UnitAddContainer.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'opendc-web/opendc-web-ui/src/components/topologies/sidebar/machine/UnitAddContainer.js') diff --git a/opendc-web/opendc-web-ui/src/components/topologies/sidebar/machine/UnitAddContainer.js b/opendc-web/opendc-web-ui/src/components/topologies/sidebar/machine/UnitAddContainer.js index 6b136120..a0054ef6 100644 --- a/opendc-web/opendc-web-ui/src/components/topologies/sidebar/machine/UnitAddContainer.js +++ b/opendc-web/opendc-web-ui/src/components/topologies/sidebar/machine/UnitAddContainer.js @@ -25,6 +25,7 @@ import React from 'react' import { useDispatch, useSelector } from 'react-redux' import UnitAddComponent from './UnitAddComponent' import { addUnit } from '../../../../redux/actions/topology/machine' +import UnitType from './UnitType' function UnitAddContainer({ machineId, unitType }) { const units = useSelector((state) => Object.values(state.topology[unitType])) @@ -37,7 +38,7 @@ function UnitAddContainer({ machineId, unitType }) { UnitAddContainer.propTypes = { machineId: PropTypes.string.isRequired, - unitType: PropTypes.string.isRequired, + unitType: UnitType.isRequired, } export default UnitAddContainer -- cgit v1.2.3