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 = [];
|
let visibleOccurrences = [];
|
||||||
if (oneOff || showAllDates || event.occurrences.length <= 4) {
|
if (oneOff || showAllDates || event.occurrences.length <= 4) {
|
||||||
visibleOccurrences = event.occurrences;
|
visibleOccurrences = event.occurrences.sort((a, b) =>
|
||||||
|
compareDates(a.start, b.start)
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
visibleOccurrences = futureOccurrences.slice(0, 4);
|
visibleOccurrences = futureOccurrences.slice(0, 4);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user