Skip to content

Commit

Permalink
Fix pagination in live games table (#328)
Browse files Browse the repository at this point in the history
  • Loading branch information
sepi4 authored May 7, 2024
1 parent ba47846 commit 2933ae3
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/web/src/pages/live-matches/live-matches-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,17 @@ const calculatePagination = (
const games = overviewData.games;

if (playerGroup === "1") {
return games["1v1"] + count;
return games["1v1"] ?? count;
} else if (playerGroup === "2") {
return games["2v2"] + count;
return games["2v2"] ?? count;
} else if (playerGroup === "3") {
return games["3v3"] + count;
return games["3v3"] ?? count;
} else if (playerGroup === "4") {
return games["4v4"] + count;
return games["4v4"] ?? count;
} else if (playerGroup === "5") {
return games["AI"] + count;
return games["AI"] ?? count;
} else if (playerGroup === "0") {
return games["custom"] + count;
return games["custom"] ?? count;
} else {
return defaultAmountOfMatches;
}
Expand Down

0 comments on commit 2933ae3

Please sign in to comment.