diff --git a/packages/extension-koni-ui/src/Popup/Home/Leaderboard/index.tsx b/packages/extension-koni-ui/src/Popup/Home/Leaderboard/index.tsx index 4f2146d3c5..87bb1a7d6f 100644 --- a/packages/extension-koni-ui/src/Popup/Home/Leaderboard/index.tsx +++ b/packages/extension-koni-ui/src/Popup/Home/Leaderboard/index.tsx @@ -109,9 +109,11 @@ const Component = ({ className }: Props): React.ReactElement => { return baseItems.map((item) => { const { end: endDate, start: startDate } = calculateStartAndEnd(item.value); let type = 'all'; + let gameId = 0; if (item.value === TabType.INVITE_TO_PLAY){ type = 'inviteToPlay'; + gameId = 5; } return { @@ -120,7 +122,8 @@ const Component = ({ className }: Props): React.ReactElement => { ...item.leaderboardInfo, startDate, endDate, - type + type, + gameId } }; }); diff --git a/packages/extension-koni-ui/src/components/Leaderboard/LeaderboardContent.tsx b/packages/extension-koni-ui/src/components/Leaderboard/LeaderboardContent.tsx index 4c4de66d1e..57fda90155 100644 --- a/packages/extension-koni-ui/src/components/Leaderboard/LeaderboardContent.tsx +++ b/packages/extension-koni-ui/src/components/Leaderboard/LeaderboardContent.tsx @@ -21,6 +21,7 @@ export type LeaderboardTabGroupItemType = TabGroupItemType & { startDate?: string; endDate?: string; type?: string; + gameId?: number; } } @@ -83,7 +84,7 @@ const Component = ({ className, defaultSelectedTab, gameId, tabGroupItems }: Pro leaderboardSub = apiSDK.subscribeLeaderboard( currentTabInfo.leaderboardInfo.startDate, currentTabInfo.leaderboardInfo.endDate, - gameId || 0, 100, + gameId || currentTabInfo.leaderboardInfo.gameId || 0, 100, currentTabInfo.leaderboardInfo.type).subscribe((data) => { setLeaderboardItems(data); });