Skip to content

Commit

Permalink
Merge branch 'main' into prod
Browse files Browse the repository at this point in the history
  • Loading branch information
maximvl committed Sep 25, 2024
2 parents 127a84a + f669713 commit 5f560ca
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/pages/stats/StatsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down Expand Up @@ -100,7 +102,17 @@ export default function StatsPage() {
{playersStatsByPosition.map((playerStat, index) => (
<TableRow key={index}>
<TableCell>{index + 1}</TableCell>
<TableCell>{playersById[playerStat.id].name}</TableCell>
<TableCell>
<Link
to={`/players/${playersById[playerStat.id].url_handle}`}
>
<LinkSpan
color={getPlayerColor(playersById[playerStat.id])}
>
{playersById[playerStat.id].name}
</LinkSpan>
</Link>
</TableCell>
<TableCell>{playerStat.map_position}</TableCell>
<TableCell>{getPlayerScore(playerStat)}</TableCell>
<TableCell>{playerStat.games_completed}</TableCell>
Expand Down

0 comments on commit 5f560ca

Please sign in to comment.