import React from 'react'; import PropTypes from 'prop-types'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import './Service.css'; import Graph from './Graph.js'; const Service = ({ graph, name, status, latency, description }) => (

{name} {latency ? ( {Math.round(latency)}ms ) : null}

{description}

{graph ? : null}
); Service.defaultProps = { graph: null, latency: null, }; Service.propTypes = { graph: PropTypes.arrayOf( PropTypes.arrayOf(PropTypes.number), ), name: PropTypes.string.isRequired, status: PropTypes.bool.isRequired, latency: PropTypes.number, description: PropTypes.string.isRequired, }; export default Service;