import React from 'react'; import PropTypes from 'prop-types'; import { translate as __ } from 'foremanReact/common/I18n'; const DetailsExpansion = ({ cvId, activationKeys, hosts }) => { const activationKeyCount = activationKeys.length; const hostCount = hosts.length; return (
{__('Activation keys: ')}{activationKeyCount}
{__('Hosts: ')}{hostCount}
); }; DetailsExpansion.propTypes = { cvId: PropTypes.number.isRequired, activationKeys: PropTypes.arrayOf(PropTypes.shape({})), hosts: PropTypes.arrayOf(PropTypes.shape({})), }; DetailsExpansion.defaultProps = { activationKeys: [], hosts: [], }; export default DetailsExpansion;