stats reorg, upcoming refinement

This commit is contained in:
yohlo
2025-09-14 23:10:05 -05:00
parent 8efc0a7a4b
commit 9a105b30c6
18 changed files with 703 additions and 373 deletions

View File

@@ -2,7 +2,8 @@ import { Box, Text } from "@mantine/core";
import Header from "./header";
import SwipeableTabs from "@/components/swipeable-tabs";
import TournamentList from "@/features/tournaments/components/tournament-list";
import { useTeam } from "../../queries";
import StatsOverview from "@/shared/components/stats-overview";
import { useTeam, useTeamStats } from "../../queries";
interface ProfileProps {
id: string;
@@ -10,12 +11,13 @@ interface ProfileProps {
const TeamProfile = ({ id }: ProfileProps) => {
const { data: team } = useTeam(id);
const { data: stats, isLoading: statsLoading, error: statsError } = useTeamStats(id);
if (!team) return <Text p="md">Team not found</Text>;
const tabs = [
{
label: "Overview",
content: <Text p="md">Stats/Badges will go here</Text>,
content: <StatsOverview statsData={statsError ? null : stats || null} isLoading={statsLoading} />,
},
{
label: "Matches",