import { Stack } from "@mantine/core"; import { Match } from "../types"; import MatchCard from "./match-card"; interface MatchListProps { matches: Match[]; } const MatchList = ({ matches }: 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) || []; if (!filteredMatches.length) { return undefined; } return ( {filteredMatches.map((match, index) => (
))}
); }; export default MatchList;