diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/components/ScotsounCdGallery.astro | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/components/ScotsounCdGallery.astro b/src/components/ScotsounCdGallery.astro index 0a8cd92..8ae2b22 100644 --- a/src/components/ScotsounCdGallery.astro +++ b/src/components/ScotsounCdGallery.astro @@ -1,9 +1,14 @@ --- import { getAllScotsoun } from '$data/scotsoun'; import getLocaleFromPath from '$lib/getLocaleFromPath'; +import type Scotsoun from '$types/Scotsoun'; const locale = getLocaleFromPath(Astro.url.pathname); -const scotsoun = await getAllScotsoun(); +const scotsoun = (await getAllScotsoun()).sort(scotsounIdDescending); + +function scotsounIdDescending(scotsoun1: Scotsoun, scotsoun2: Scotsoun) { + return scotsoun2.scotsounId.localeCompare(scotsoun1.scotsounId); +} --- <ul class="link-gallery link-gallery--scotsoun"> |
