From 6bc00cc69c879c50b1d76b9fd0e190dcce9f5ad9 Mon Sep 17 00:00:00 2001 From: sepi4 Date: Tue, 7 May 2024 21:48:42 +0300 Subject: [PATCH] Fix pagination in live games table --- .../src/pages/live-matches/live-matches-table.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/web/src/pages/live-matches/live-matches-table.tsx b/packages/web/src/pages/live-matches/live-matches-table.tsx index b98d7f68..728c0b06 100644 --- a/packages/web/src/pages/live-matches/live-matches-table.tsx +++ b/packages/web/src/pages/live-matches/live-matches-table.tsx @@ -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; }