regional teams

This commit is contained in:
yohlo
2026-02-09 23:36:04 -06:00
parent 5dd41d8022
commit 63853f22de
10 changed files with 181 additions and 85 deletions

View File

@@ -13,7 +13,7 @@ import { DotsNineIcon } from "@phosphor-icons/react";
import { useServerMutation } from "@/lib/tanstack-query/hooks/use-server-mutation";
import { generateTournamentBracket } from "../../matches/server";
import { TeamInfo } from "@/features/teams/types";
import Avatar from "@/components/avatar";
import TeamAvatar from "@/components/team-avatar";
import { useBracketPreview } from "@/features/bracket/queries";
import { BracketData } from "@/features/bracket/types";
import BracketView from "@/features/bracket/components/bracket-view";
@@ -23,11 +23,13 @@ import { tournamentKeys } from "../queries";
interface SeedTournamentProps {
tournamentId: string;
teams: TeamInfo[];
isRegional?: boolean;
}
const SeedTournament: React.FC<SeedTournamentProps> = ({
tournamentId,
teams,
isRegional,
}) => {
const [orderedTeams, setOrderedTeams] = useState<TeamInfo[]>(teams);
const { data: bracketPreview } = useBracketPreview(teams.length);
@@ -171,15 +173,11 @@ const SeedTournament: React.FC<SeedTournamentProps> = ({
}}
/>
<Avatar
<TeamAvatar
team={team}
size={24}
radius="sm"
name={team.name}
src={
team.logo
? `/api/files/teams/${team.id}/${team.logo}`
: undefined
}
isRegional={isRegional}
/>
<Text fw={500} size="sm" style={{ flex: 1 }}>