pluralize indicative in DegradedNotice comp
This commit is contained in:
parent
31f171e94a
commit
7b7cc187e7
|
@ -6,11 +6,13 @@ import './DegradedNotice.css'
|
||||||
const DegradedNotice = ({ services }) => {
|
const DegradedNotice = ({ services }) => {
|
||||||
const keys = Object.keys(services)
|
const keys = Object.keys(services)
|
||||||
const serviceNames = keys.join(', ')
|
const serviceNames = keys.join(', ')
|
||||||
|
|
||||||
const plural = keys.length === 1 ? '' : 's'
|
const plural = keys.length === 1 ? '' : 's'
|
||||||
|
const indicative = keys.length === 1 ? 'is' : 'are'
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="degraded-notice">
|
<div className="degraded-notice">
|
||||||
<header>{keys.length} service{plural} are unreachable</header>
|
<header>{keys.length} service{plural} {indicative} unreachable</header>
|
||||||
<p>
|
<p>
|
||||||
elstat is having trouble contacting <strong>{serviceNames}</strong>.
|
elstat is having trouble contacting <strong>{serviceNames}</strong>.
|
||||||
</p>
|
</p>
|
||||||
|
|
Loading…
Reference in New Issue