From 9c2e06fc224e1fba1427ca376904fa716ba04e13 Mon Sep 17 00:00:00 2001 From: "Kalle (Sendou)" <38327916+Sendouc@users.noreply.github.com> Date: Sat, 16 Jan 2021 00:09:44 +0200 Subject: [PATCH] fix team page country count --- pages/t/index.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pages/t/index.tsx b/pages/t/index.tsx index 6defca446..0377d4529 100644 --- a/pages/t/index.tsx +++ b/pages/t/index.tsx @@ -66,7 +66,9 @@ const TeamsPage: React.FC = ({ teams }) => { {teams .flatMap((team) => - team.roster.map((user) => user.profile?.country) + Array.from( + new Set(team.roster.map((user) => user.profile?.country)) + ) ) .reduce((acc: [string, number][], cur) => { if (!cur) return acc;