Fix result pluralization
This commit is contained in:
parent
0b9cd7ff54
commit
48d8cef2fd
@ -106,9 +106,10 @@ const Results = (props: ResultsProps) => {
|
||||
|
||||
const renderedName = renderConlang(conlang);
|
||||
const searchType = (props.direction === SearchDirection.ToConlang) ? `English -> ${renderedName}` : `${renderedName} -> English`;
|
||||
const result = num === 1 ? 'result' : 'results';
|
||||
const header = (
|
||||
<div className="searchResultHeader" key="header">
|
||||
Searched for <b>{ props.searchTerm }</b>, { searchType }, found { num } result(s)
|
||||
Searched for <b>{ props.searchTerm }</b>, { searchType }, found { num } { result }
|
||||
</div>);
|
||||
const entries = props.searchResults.map(
|
||||
(entry, _idx) => <Entry entry={ entry } key= { entry.id } conlang={ conlang } />,
|
||||
|
Loading…
Reference in New Issue
Block a user