summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/components/LallansIssuesGallery.astro7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/components/LallansIssuesGallery.astro b/src/components/LallansIssuesGallery.astro
index f3db9b3..9ade033 100644
--- a/src/components/LallansIssuesGallery.astro
+++ b/src/components/LallansIssuesGallery.astro
@@ -1,9 +1,14 @@
---
import { getAllLallansIssues } from '$data/lallans';
import getLocaleFromPath from '$lib/getLocaleFromPath';
+import type LallansIssue from '$types/LallansIssue';
const locale = getLocaleFromPath(Astro.url.pathname);
-const issues = await getAllLallansIssues();
+const issues = (await getAllLallansIssues()).sort(issueNumberDescending);
+
+function issueNumberDescending(issue1: LallansIssue, issue2: LallansIssue) {
+ return issue2.issueNumber - issue1.issueNumber;
+}
---
<ul class="link-gallery link-gallery--lallans">