import React from "react"; import Shapes from "../../../../shapes"; const UnitIcon = ({id, type}) => (
{"Machine
); const MachineComponent = ({position, machine, onClick}) => (
  • {position}
    {machine.cpuIds.length > 0 ? : undefined } {machine.gpuIds.length > 0 ? : undefined } {machine.memoryIds.length > 0 ? : undefined } {machine.storageIds.length > 0 ? : undefined } {machine.cpuIds.length + machine.gpuIds.length + machine.memoryIds.length + machine.storageIds.length === 0 ? Machine with no units : undefined }
  • ); MachineComponent.propTypes = { machine: Shapes.Machine }; export default MachineComponent;