Open source, privacy-first web analytics. Lightweight, cookie-free Google Analytics alternative. Self-hosted or cloud.
TypeScript analyticsanalytics-dashboardclickhouseelixirgoogle-analyticsmarketingopen-source-analyticsphoenixplausible-analyticspostgresqlprivacyprivacy-friendlyself-hostedsimple-analyticsstatisticstailwindcssweb-analyticswebsite-analyticswebsite-statswebsite-tracking
Fix pluralisation in 'current visitors' (#253)
Michael (a.k.a. Resynth)1c2d96e81e10
diff --git a/assets/js/dashboard/stats/current-visitors.js b/assets/js/dashboard/stats/current-visitors.jsindex c058a28f32..5543398a76 100644--- a/assets/js/dashboard/stats/current-visitors.js+++ b/assets/js/dashboard/stats/current-visitors.js@@ -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 {