diff --git a/components/match/matchList.tsx b/components/match/matchList.tsx index ebc2e7a..ae71f93 100644 --- a/components/match/matchList.tsx +++ b/components/match/matchList.tsx @@ -7,7 +7,10 @@ export type MatchListProps = { } export default async function MatchList(props: MatchListProps) { - const components = props.matches.map((match) => + const components = props.matches + // sort by date in ascending order + .sort((a, b) => new Date(a.startAt).getTime() - new Date(b.startAt).getTime()) + .map((match) =>