sortierung nach DAtum
This commit is contained in:
@@ -46,14 +46,7 @@ export default function KoFixtures({ teams, matches }: { teams: Team[]; matches:
|
||||
teams.some(t => t.id === m.homeTeamId) &&
|
||||
teams.some(t => t.id === m.awayTeamId),
|
||||
)
|
||||
.sort((a, b) => {
|
||||
// Live zuerst
|
||||
const aLive = isLive(a) ? 1 : 0;
|
||||
const bLive = isLive(b) ? 1 : 0;
|
||||
if (aLive !== bLive) return bLive - aLive;
|
||||
// Innerhalb Live/Upcoming/Finished: Datum aufsteigend
|
||||
return +new Date(a.utcDate) - +new Date(b.utcDate);
|
||||
});
|
||||
.sort((a, b) => +new Date(a.utcDate) - +new Date(b.utcDate));
|
||||
}, [matches, teams]);
|
||||
|
||||
// Lokale Datums-Extraktion (vermeidet UTC-Tagesverschiebung bei US-Spielen)
|
||||
|
||||
Reference in New Issue
Block a user