pluralize indicative in DegradedNotice comp
This commit is contained in:
parent
31f171e94a
commit
7b7cc187e7
1 changed files with 3 additions and 1 deletions
|
@ -6,11 +6,13 @@ import './DegradedNotice.css'
|
|||
const 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 (
|
||||
<div className="degraded-notice">
|
||||
<header>{keys.length} service{plural} are unreachable</header>
|
||||
<header>{keys.length} service{plural} {indicative} unreachable</header>
|
||||
<p>
|
||||
elstat is having trouble contacting <strong>{serviceNames}</strong>.
|
||||
</p>
|
||||
|
|
Loading…
Reference in a new issue