import React from 'react' import { UncontrolledPopover, PopoverHeader, PopoverBody, Button } from 'reactstrap' function UnitComponent({ index, unitType, unit, onDelete }) { let unitInfo if (unitType === 'cpu' || unitType === 'gpu') { unitInfo = ( <> Clockrate: {unit.clockRateMhz}
Num. Cores: {unit.numberOfCores}
Energy Cons.: {unit.energyConsumptionW} W
) } else if (unitType === 'memory' || unitType === 'storage') { unitInfo = ( <> Speed: {unit.speedMbPerS} Mb/s
Size: {unit.sizeMb} MB
Energy Cons.: {unit.energyConsumptionW} W
) } return (
  • {unit.name}
  • ) } export default UnitComponent