From f66971356c63086c445feca2025c3e70e9548ac6 Mon Sep 17 00:00:00 2001 From: Maxim Velesyuk Date: Wed, 25 Sep 2024 11:34:28 +0200 Subject: [PATCH] Add player links to leaderboard table --- src/pages/stats/StatsPage.tsx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/pages/stats/StatsPage.tsx b/src/pages/stats/StatsPage.tsx index 5f8ac1e2..407d7f97 100644 --- a/src/pages/stats/StatsPage.tsx +++ b/src/pages/stats/StatsPage.tsx @@ -8,7 +8,9 @@ import { } from '@mui/material' import { useQuery } from '@tanstack/react-query' import BottomSection from 'components/BottomSection' +import LinkSpan from 'components/LinkSpan' import { useState } from 'react' +import { Link } from 'react-router-dom' import { fetchPlayers, fetchStats } from 'utils/api' import { getPlayerColor, Player, PlayerStats } from 'utils/types' @@ -100,7 +102,17 @@ export default function StatsPage() { {playersStatsByPosition.map((playerStat, index) => ( {index + 1} - {playersById[playerStat.id].name} + + + + {playersById[playerStat.id].name} + + + {playerStat.map_position} {getPlayerScore(playerStat)} {playerStat.games_completed}