diff --git a/src/app/routes/_authed/stats.tsx b/src/app/routes/_authed/stats.tsx
index 0c71942..03f1387 100644
--- a/src/app/routes/_authed/stats.tsx
+++ b/src/app/routes/_authed/stats.tsx
@@ -4,9 +4,8 @@ import PlayerStatsTable from "@/features/players/components/player-stats-table";
import { Suspense } from "react";
import PlayerStatsTableSkeleton from "@/features/players/components/player-stats-table-skeleton";
import { prefetchServerQuery } from "@/lib/tanstack-query/utils/prefetch";
-import SwipeableTabs from "@/components/swipeable-tabs";
import LeagueHeadToHead from "@/features/players/components/league-head-to-head";
-import { Box } from "@mantine/core";
+import { Tabs } from "@mantine/core";
export const Route = createFileRoute("/_authed/stats")({
component: Stats,
@@ -25,22 +24,22 @@ export const Route = createFileRoute("/_authed/stats")({
});
function Stats() {
- const tabs = [
- {
- label: "Stats",
- content: (
+ return (
+
+
+ Stats
+ Head to Head
+
+
+
}>
- ),
- },
- {
- label: "Head to Head",
- content: ,
- },
- ];
+
- return
-
- ;
+
+
+
+
+ );
}
diff --git a/src/components/stats-overview.tsx b/src/components/stats-overview.tsx
index 60a3bbd..57f5bb3 100644
--- a/src/components/stats-overview.tsx
+++ b/src/components/stats-overview.tsx
@@ -101,7 +101,7 @@ const StatsOverview = ({ statsData, isLoading = false }: StatsOverviewProps) =>
{ label: "Losses", value: overallStats.losses, Icon: XIcon },
{ label: "Cups Made", value: overallStats.total_cups_made, Icon: FireIcon },
{ label: "Cups Against", value: overallStats.total_cups_against, Icon: ShieldIcon },
- { label: "Avg Cups Per Game", value: avgCupsPerMatch >= 0 ? avgCupsPerMatch : null, Icon: ChartLineUpIcon },
+ { label: "Avg Cups Per Match", value: avgCupsPerMatch >= 0 ? avgCupsPerMatch : null, Icon: ChartLineUpIcon },
{ label: "Avg Cups Against", value: avgCupsAgainstPerMatch >= 0 ? avgCupsAgainstPerMatch : null, Icon: ShieldCheckIcon },
{ label: "Avg Win Margin", value: avgMarginOfVictory >= 0 ? avgMarginOfVictory : null, Icon: ArrowUpIcon },
{ label: "Avg Loss Margin", value: avgMarginOfLoss >= 0 ? avgMarginOfLoss : null, Icon: ArrowDownIcon },
@@ -133,7 +133,7 @@ export const StatsSkeleton = () => {
{ label: "Losses", Icon: XIcon },
{ label: "Cups Made", Icon: FireIcon },
{ label: "Cups Against", Icon: ShieldIcon },
- { label: "Avg Cups Per Game", Icon: ChartLineUpIcon },
+ { label: "Avg Cups Per Match", Icon: ChartLineUpIcon },
{ label: "Avg Cups Against", Icon: ShieldCheckIcon },
{ label: "Avg Win Margin", Icon: ArrowUpIcon },
{ label: "Avg Loss Margin", Icon: ArrowDownIcon },
diff --git a/src/features/players/components/player-head-to-head-sheet.tsx b/src/features/players/components/player-head-to-head-sheet.tsx
index 7e0dbb0..5ddbe1f 100644
--- a/src/features/players/components/player-head-to-head-sheet.tsx
+++ b/src/features/players/components/player-head-to-head-sheet.tsx
@@ -108,7 +108,7 @@ const PlayerHeadToHeadSheet = ({
);
}
- const totalGames = stats.player1Wins + stats.player2Wins;
+ const totalMatches = stats.player1Wins + stats.player2Wins;
const leader =
stats.player1Wins > stats.player2Wins
? player1Name
@@ -163,7 +163,7 @@ const PlayerHeadToHeadSheet = ({
)}
- {!leader && totalGames > 0 && (
+ {!leader && totalMatches > 0 && (
Series is tied
@@ -204,8 +204,8 @@ const PlayerHeadToHeadSheet = ({
- {totalGames > 0
- ? (stats.player1CupsFor / totalGames).toFixed(1)
+ {totalMatches > 0
+ ? (stats.player1CupsFor / totalMatches).toFixed(1)
: "0.0"}
@@ -213,15 +213,15 @@ const PlayerHeadToHeadSheet = ({
- Avg Cups/Game
+ Avg Cups/Match
avg
- {totalGames > 0
- ? (stats.player2CupsFor / totalGames).toFixed(1)
+ {totalMatches > 0
+ ? (stats.player2CupsFor / totalMatches).toFixed(1)
: "0.0"}
@@ -259,7 +259,7 @@ const PlayerHeadToHeadSheet = ({
- Match History ({totalGames} games)
+ Match History ({totalMatches})
diff --git a/src/features/players/components/player-stats-table.tsx b/src/features/players/components/player-stats-table.tsx
index 0f8d861..e602c08 100644
--- a/src/features/players/components/player-stats-table.tsx
+++ b/src/features/players/components/player-stats-table.tsx
@@ -6,6 +6,7 @@ import {
Group,
Box,
ThemeIcon,
+ Container,
Title,
Divider,
UnstyledButton,
@@ -291,7 +292,7 @@ const PlayerStatsTable = () => {
if (playerStats.length === 0) {
return (
-
+
@@ -300,12 +301,12 @@ const PlayerStatsTable = () => {
No Stats Available
-
+
);
}
return (
-
+
Showing {filteredAndSortedStats.length} of {playerStats.length} players
@@ -450,7 +451,7 @@ const PlayerStatsTable = () => {
)}
-
+
);
};