diff --git a/src/RaceChart.tsx b/src/RaceChart.tsx index 402ef36..00f09db 100644 --- a/src/RaceChart.tsx +++ b/src/RaceChart.tsx @@ -1,5 +1,6 @@ import { FC, useEffect, useState } from "react"; import { PlayerRanking } from "./types"; +import { useSession } from "./Session"; interface RaceChartProps { players: PlayerRanking[]; @@ -34,13 +35,13 @@ const RaceChart: FC = ({ players, std }) => { const gap = 8; const maxValue = Math.max(...players.map((player) => player.rank)) + 1; const barHeight = (height - 2 * padding) / players.length; - const fontSize = Math.min(barHeight - 1.5 * gap, width / 20); + const fontSize = Math.min(barHeight - 1.5 * gap, width / 22); return ( - + {players.map((player, index) => ( = ({ players, std }) => { ))} {players.map((player, index) => ( - +