diff --git a/src/components/matches/MatchTitle.tsx b/src/components/matches/MatchTitle.tsx index fb5dee7..f362546 100644 --- a/src/components/matches/MatchTitle.tsx +++ b/src/components/matches/MatchTitle.tsx @@ -29,7 +29,7 @@ export function MatchTitle(props: MatchTitleProps) { /> ) : (

setEditing(true)} > {props.match.name || 'Add name'} diff --git a/src/state/useMatches.ts b/src/state/useMatches.ts index c7b8cfe..a34b5a4 100644 --- a/src/state/useMatches.ts +++ b/src/state/useMatches.ts @@ -52,12 +52,7 @@ export function setMatchesFromTBA(tbaEvent: TBAEvent, tbaMatches: TBAMatch[]) { return parseInt(matchNumber); } const matches: SplitterMatch[] = tbaMatches.map((t) => { - let name = ''; - if (t.comp_level === 'qm') { - name = `${t.comp_level.toUpperCase()}${t.match_number}`; - } else { - name = `${t.comp_level.toUpperCase()}${t.set_number}-${t.match_number}`; - } + let name = t.key.split('_')[1]; const description = `${t.alliances.red.team_keys .map(matchKeyToNumber)