import { Flex } from '@mantine/core'; import React from 'react'; import { BracketMaps } from '../utils/bracket-maps'; import { BracketRound } from './bracket-round'; import { Match } from '../types'; interface BracketViewProps { bracket: Match[][]; bracketMaps: BracketMaps; onAnnounce?: (teamOne: any, teamTwo: any) => void; } const BracketView: React.FC = ({ bracket, bracketMaps, onAnnounce, }) => { const getParentMatchOrder = (parentLid: number): number | string => { const parentMatch = bracketMaps.matchByLid.get(parentLid); if ( parentMatch && parentMatch.order !== null && parentMatch.order !== undefined ) { return parentMatch.order; } return `Match ${parentLid}`; }; return ( {bracket.map((round, roundIndex) => ( ))} ); }; export default BracketView;