skeletons, tournament stats, polish, bug fixes

This commit is contained in:
yohlo
2025-09-23 14:48:04 -05:00
parent 7ff26229d9
commit 7441d1ac58
36 changed files with 990 additions and 457 deletions

View File

@@ -1,9 +1,11 @@
import { Box, Text } from "@mantine/core";
import { useMemo } from "react";
import { Box } from "@mantine/core";
import Header from "./header";
import TeamList from "@/features/teams/components/team-list";
import SwipeableTabs from "@/components/swipeable-tabs";
import { useTournament } from "../../queries";
import MatchList from "@/features/matches/components/match-list";
import { TournamentStats } from "../tournament-stats";
interface ProfileProps {
id: string;
@@ -13,22 +15,22 @@ const Profile = ({ id }: ProfileProps) => {
const { data: tournament } = useTournament(id);
if (!tournament) return null;
const tabs = [
const tabs = useMemo(() => [
{
label: "Overview",
content: <Text p="md">Stats/Badges will go here, bracket link</Text>
content: <TournamentStats tournament={tournament} />
},
{
label: "Matches",
content: <MatchList matches={tournament.matches?.sort((a, b) => b.order - a.order) || []} />
},
{
label: "Teams",
label: "Teams",
content: <>
<TeamList teams={tournament.teams || []} />
</>
}
];
], [tournament]);
return <>
<Header tournament={tournament} />