fix team page country count

This commit is contained in:
Kalle (Sendou)
2021-01-16 00:09:44 +02:00
parent 30771b7423
commit 9c2e06fc22

View File

@@ -66,7 +66,9 @@ const TeamsPage: React.FC<Props> = ({ teams }) => {
<option value="ALL">All ({teams.length})</option>
{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;