regional teams
This commit is contained in:
@@ -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 }}>
|
||||
|
||||
Reference in New Issue
Block a user