web: sort occurrences by date when showing all
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user