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 7d1a092 commit 4ac9d1dCopy full SHA for 4ac9d1d
pages/blog/index.js
@@ -17,7 +17,12 @@ export default function Blog({ posts }) {
17
if (searchTerm) {
18
const filteredPosts = blogSearch(posts, searchTerm);
19
filteredData.posts = filteredPosts;
20
- filteredData.heading = `${filteredPosts.length} search Results for '${searchTerm}'`;
+ filteredData.heading = `${
21
+ filteredPosts.length === 0 ? 'no' : filteredPosts.length
22
+ } search
23
+ ${filteredPosts.length > 1 ? 'results' : 'result'} for
24
+ '${searchTerm}'`;
25
+ filteredData.viewall = false;
26
}
27
28
return (
0 commit comments