We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8290542 commit 1bfd109Copy full SHA for 1bfd109
components/Stats/index.js
@@ -7,6 +7,7 @@ class Stats extends React.Component {
7
var template = this.props.template;
8
var data = {
9
nbHits: this.props.nbHits,
10
+ isPlural: this.props.nbHits > 1,
11
processingTimeMS: this.props.processingTimeMS
12
};
13
widgets/stats/template.html
@@ -1,4 +1,4 @@
1
<div>
2
- {{nbHits}} results
+ {{nbHits}} {{#isPlural}}results{{/isPlural}}{{^isPlural}}result{{/isPlural}}
3
<small>found in {{processingTimeMS}}ms</small>
4
</div>
0 commit comments