diff --git a/app/features/tournament/core/Standings.ts b/app/features/tournament/core/Standings.ts index 19378ce27..e092fddf3 100644 --- a/app/features/tournament/core/Standings.ts +++ b/app/features/tournament/core/Standings.ts @@ -52,7 +52,8 @@ export function matchesPlayed({ (match) => match.opponent1 && match.opponent2 && - (match.opponent1?.id === teamId || match.opponent2?.id === teamId), + (match.opponent1?.id === teamId || match.opponent2?.id === teamId) && + (match.opponent1.result === "win" || match.opponent2?.result === "win"), ), ); diff --git a/app/features/tournament/routes/to.$id.results.tsx b/app/features/tournament/routes/to.$id.results.tsx index 99ce68bb7..726f3879d 100644 --- a/app/features/tournament/routes/to.$id.results.tsx +++ b/app/features/tournament/routes/to.$id.results.tsx @@ -5,7 +5,11 @@ import { Flag } from "~/components/Flag"; import { InfoPopover } from "~/components/InfoPopover"; import { Placement } from "~/components/Placement"; import { Table } from "~/components/Table"; -import { SPR_INFO_URL, tournamentTeamPage } from "~/utils/urls"; +import { + SPR_INFO_URL, + tournamentMatchPage, + tournamentTeamPage, +} from "~/utils/urls"; import * as Standings from "../core/Standings"; import { useTournament } from "./to.$id"; @@ -141,7 +145,11 @@ function MatchHistoryRow({ teamId }: { teamId: number }) {
{teamMatches.map((match) => { return ( - + {match.vsSeed} ); @@ -152,16 +160,23 @@ function MatchHistoryRow({ teamId }: { teamId: number }) { function MatchResultSquare({ result, + matchId, children, -}: { result: "win" | "loss"; children: React.ReactNode }) { +}: { result: "win" | "loss"; matchId: number; children: React.ReactNode }) { + const tournament = useTournament(); + return ( -
{children} -
+ ); } diff --git a/app/features/tournament/tournament.css b/app/features/tournament/tournament.css index 73a5aa49d..97573df8f 100644 --- a/app/features/tournament/tournament.css +++ b/app/features/tournament/tournament.css @@ -614,6 +614,7 @@ font-weight: var(--semi-bold); border: 3px solid var(--theme); border-radius: var(--rounded-sm); + color: var(--text); } .tournament__standings__match-result-square--win {