--- import { getAllScotsoun } from '$data/scotsoun'; import { getLocaleFromPathOrThrow } from '$lib/getLocaleFromPath'; import type Scotsoun from '$types/Scotsoun'; const locale = getLocaleFromPathOrThrow(Astro.url.pathname); const scotsoun = (await getAllScotsoun()).sort(scotsounIdDescending); function scotsounIdDescending(scotsoun1: Scotsoun, scotsoun2: Scotsoun) { return scotsoun2.scotsounId.localeCompare(scotsoun1.scotsounId); } ---