Skip to content

Commit

Permalink
id
Browse files Browse the repository at this point in the history
  • Loading branch information
inker committed Jul 6, 2024
1 parent 4d486ba commit 37a645a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/containers/LeagueStage/MatchesTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ function MatchesTable({ allTeams, pairings, potSize }: Props) {
const pairingsMap = useMemo(() => {
const o: Record<`${string}:${string}`, boolean> = {};
for (const pairing of pairings) {
o[`${pairing[0].name}:${pairing[1].name}`] = true;
o[`${pairing[0].id}:${pairing[1].id}`] = true;
}
return o;
}, [pairings]);
Expand Down Expand Up @@ -214,7 +214,7 @@ function MatchesTable({ allTeams, pairings, potSize }: Props) {
<TeamDiv country={team.country}>{team.name}</TeamDiv>
</TeamCell>
{allTeams.map(opponent => {
const isMatch = pairingsMap[`${team.name}:${opponent.name}`];
const isMatch = pairingsMap[`${team.id}:${opponent.id}`];
return (
<TableCell
key={opponent.id}
Expand Down
2 changes: 1 addition & 1 deletion src/containers/LeagueStage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ function LeagueStage({ season, pots: initialPots }: Props) {
initialPots.map(pot =>
pot.map(team => ({
...team,
id: `${team.country}:${team.name}`,
id: `${team.country}|${team.name}`,
})),
),
[initialPots],
Expand Down

0 comments on commit 37a645a

Please sign in to comment.