From eda68d6ad1bb4902eb8e59caf7d11c0ba439fb8a Mon Sep 17 00:00:00 2001 From: Yi-Jyun Pan Date: Thu, 24 Oct 2024 11:25:19 +0800 Subject: [PATCH] fix(overview): Limit leaderboard to show 10 users --- src/Controller/OverviewCardsController.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Controller/OverviewCardsController.php b/src/Controller/OverviewCardsController.php index cb26ff5..8a377c3 100644 --- a/src/Controller/OverviewCardsController.php +++ b/src/Controller/OverviewCardsController.php @@ -207,6 +207,7 @@ public function leaderboard( SolutionEventRepository $solutionEventRepository, ): Response { $leaderboard = $solutionEventRepository->listLeaderboard($user->getGroup(), '7 days'); + $leaderboard = \array_slice($leaderboard, 0, 10); return $this->render('overview/cards/leaderboard.html.twig', [ 'leaderboard' => $leaderboard,