From f5f4c2f0c131c6c878fc2d8924ad9aa9cb6de89a Mon Sep 17 00:00:00 2001 From: Topvennie Date: Thu, 10 Oct 2024 22:03:28 +0200 Subject: [PATCH] vinvoor: give right leaderboard color --- vinvoor/src/leaderboard/LeaderboardTableBody.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vinvoor/src/leaderboard/LeaderboardTableBody.tsx b/vinvoor/src/leaderboard/LeaderboardTableBody.tsx index 41c8743..2057208 100644 --- a/vinvoor/src/leaderboard/LeaderboardTableBody.tsx +++ b/vinvoor/src/leaderboard/LeaderboardTableBody.tsx @@ -6,13 +6,13 @@ import { Typography, } from "@mui/material"; import { alpha, Theme, useTheme } from "@mui/material/styles"; +import { useLeaderboardItems } from "../hooks/useLeaderboard"; +import { useUser } from "../hooks/useUser"; import { TableHeadCell } from "../types/general"; import { leaderboardHeadCells, LeaderboardItem } from "../types/leaderboard"; import FirstPlaceIcon from "/first_place.svg"; import SecondPlaceIcon from "/second_place.svg"; import ThirdPlaceIcon from "/third_place.svg"; -import { useLeaderboardItems } from "../hooks/useLeaderboard"; -import { useUser } from "../hooks/useUser"; const leaderboardColors = [ (theme: Theme) => theme.leaderboard.first, @@ -124,7 +124,7 @@ export const LeaderboardTableBody = () => { theme.palette.action.activatedOpacity, ), }), - ...getLeaderboardColor(index, theme), + ...getLeaderboardColor(row.position - 1, theme), }} > {leaderboardHeadCells.map(headCell => (