From 96c2fb4b7bc81b546c576501e894d062a0478c0d Mon Sep 17 00:00:00 2001 From: Wes Bos Date: Thu, 9 Jan 2020 12:12:28 -0500 Subject: [PATCH] topics trim --- src/data.js | 1 + src/util/stats.js | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/data.js b/src/data.js index 5082efe8..f16962a7 100644 --- a/src/data.js +++ b/src/data.js @@ -32,6 +32,7 @@ const pages = [ 'JavaScript', 'React', 'Node', + 'CSS', ], }, { diff --git a/src/util/stats.js b/src/util/stats.js index f95cbb00..8564df35 100644 --- a/src/util/stats.js +++ b/src/util/stats.js @@ -44,7 +44,8 @@ export function tags() { // sort and filter for any tags that only have 1 const tags = Object.entries(counts) .sort(([, countA], [, countB]) => countB - countA) - .filter(([, count]) => count > 1) + // Only show the tag if this topic has 3 or more people in it + .filter(([, count]) => count >= 3) .map(([name, count]) => ({ name, count })); return [{ name: 'all', count: people.length }, ...tags];