web: sort occurrences by date when showing all

This commit is contained in:
2025-04-30 16:24:12 +02:00
parent 9114acf32f
commit 7030950850

View File

@ -62,7 +62,9 @@ export const DateList = ({ event }: { event: EventFragment }) => {
let visibleOccurrences = [];
if (oneOff || showAllDates || event.occurrences.length <= 4) {
visibleOccurrences = event.occurrences;
visibleOccurrences = event.occurrences.sort((a, b) =>
compareDates(a.start, b.start)
);
} else {
visibleOccurrences = futureOccurrences.slice(0, 4);
}