Fix pluralisation in 'current visitors' (#253)

Closes #239.
pull/257/head
Michael (a.k.a. Resynth) 6 years ago committed by GitHub
parent 9308103244
commit 1c2d96e81e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -22,13 +22,14 @@ export default class CurrentVisitors extends React.Component {
}
render() {
if (this.state.currentVisitors !== null) {
const { currentVisitors } = this.state;
if (currentVisitors !== null) {
return (
<Link to={`/${encodeURIComponent(this.props.site.domain)}?period=realtime`} className="block text-sm font-bold text-gray-500 mt-1">
<svg className="w-2 mr-2 fill-current text-green-500 inline" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
<circle cx="8" cy="8" r="8"/>
</svg>
{this.state.currentVisitors} current visitors
{currentVisitors} current visitor{currentVisitors === 1 ? '' : 's'}
</Link>
)
} else {

Loading…
Cancel
Save