import React from 'react' import PropTypes from 'prop-types' import './DegradedNotice.css' export default function DegradedNotice({ services }) { const keys = Object.keys(services) const serviceNames = keys.join(', ') const plural = keys.length === 1 ? '' : 's' const indicative = keys.length === 1 ? 'is' : 'are' return (
{keys.length} service {plural} {indicative} unreachable

elstat is having trouble contacting {serviceNames}.

) } DegradedNotice.propTypes = { services: PropTypes.object.isRequired, }