fixes, improvmeents

This commit is contained in:
yohlo
2025-10-10 23:44:27 -05:00
parent f96f92c7c9
commit 4b534c86cd
5 changed files with 99 additions and 6 deletions

View File

@@ -1,4 +1,4 @@
import { useState, useMemo, useCallback, memo } from "react";
import { useState, useMemo, useCallback, memo, use } from "react";
import {
Text,
TextInput,
@@ -68,13 +68,15 @@ const PlayerListItem = memo(({ stat, onPlayerClick, mmr }: PlayerListItemProps)
{stat.player_name}
</Text>
<Text size="xs" c="dimmed" ta="right">
{stat.matches} matches
{stat.matches}
<Text span fw={800}>M</Text>
</Text>
<Text size="xs" c="dimmed" ta="right">
{stat.tournaments} tournaments
{stat.tournaments}
<Text span fw={800}>T</Text>
</Text>
</Group>
<Group gap="md" ta="center">
<Group gap={8} ta="center">
<Stack gap={0}>
<Text size="xs" c="dimmed" fw={700}>
MMR
@@ -109,7 +111,15 @@ const PlayerListItem = memo(({ stat, onPlayerClick, mmr }: PlayerListItemProps)
</Stack>
<Stack gap={0}>
<Text size="xs" c="dimmed" fw={700}>
AVG
AWM
</Text>
<Text size="xs" c="dimmed">
{stat.margin_of_victory?.toFixed(1) || 0}
</Text>
</Stack>
<Stack gap={0}>
<Text size="xs" c="dimmed" fw={700}>
AC
</Text>
<Text size="xs" c="dimmed">
{stat.avg_cups_per_match.toFixed(1)}
@@ -301,6 +311,42 @@ const PlayerStatsTable = () => {
</Popover.Target>
<Popover.Dropdown>
<Box maw={280}>
<Text size="sm" fw={500} mb="xs">
Stat Abbreviations:
</Text>
<Text size="xs" mb={2}>
<strong>M:</strong> Matches
</Text>
<Text size="xs" mb={2}>
<strong>T:</strong> Tournaments
</Text>
<Text size="xs" mb={2}>
<strong>MMR:</strong> Matchmaking Rating
</Text>
<Text size="xs" mb={2}>
<strong>W:</strong> Wins
</Text>
<Text size="xs" mb={2}>
<strong>L:</strong> Losses
</Text>
<Text size="xs" mb={2}>
<strong>W%:</strong> Win Percentage
</Text>
<Text size="xs" mb={2}>
<strong>AWM:</strong> Average Win Margin
</Text>
<Text size="xs" mb={2}>
<strong>AC:</strong> Average Cups Per Match
</Text>
<Text size="xs" mb={2}>
<strong>CF:</strong> Cups For
</Text>
<Text size="xs" mb={2}>
<strong>CA:</strong> Cups Against
</Text>
<Divider my="sm" />
<Text size="sm" fw={500} mb="xs">
MMR Calculation:
</Text>