match h2h

This commit is contained in:
yohlo
2025-10-11 13:40:12 -05:00
parent 14c2eb2c02
commit 43972b6a06
6 changed files with 383 additions and 23 deletions

View File

@@ -4,9 +4,10 @@ import MatchCard from "./match-card";
interface MatchListProps {
matches: Match[];
hideH2H?: boolean;
}
const MatchList = ({ matches }: MatchListProps) => {
const MatchList = ({ matches, hideH2H = false }: MatchListProps) => {
const filteredMatches = matches?.filter(match =>
match.home && match.away && !match.bye && match.status != "tbd"
).sort((a, b) => a.start_time < b.start_time ? 1 : -1) || [];
@@ -21,7 +22,7 @@ const MatchList = ({ matches }: MatchListProps) => {
<div
key={`match-${match.id}-${index}`}
>
<MatchCard match={match} />
<MatchCard match={match} hideH2H={hideH2H} />
</div>
))}
</Stack>