We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cb9eceb commit cf62a8eCopy full SHA for cf62a8e
1 file changed
src/routes/arrangementer/+page.server.ts
@@ -14,7 +14,9 @@ export async function load() {
14
);
15
16
const now = new Date();
17
- const upcoming = withHtml.filter((e) => new Date(e.date) >= now && !e.cancelled);
+ const upcoming = withHtml
18
+ .filter((e) => new Date(e.date) >= now && !e.cancelled)
19
+ .sort((a, b) => new Date(a.date).getTime() - new Date(b.date).getTime());
20
const past = withHtml.filter((e) => new Date(e.date) < now && !e.cancelled);
21
const cancelled = withHtml.filter((e) => e.cancelled);
22
0 commit comments