--- import type { CollectionEntry } from "astro:content"; import { getFlagEmojiFromLocale, getLanguageNameFromLocale, } from "../utils/lang"; import { getEntries } from "astro:content"; interface Props { lang: string; translations?: CollectionEntry<"blog">["data"]["translations"]; } const { lang } = Astro.props; const translations = await getEntries(Astro.props.translations ?? []).then( (translations) => translations.sort((x, y) => x.data.lang.localeCompare(y.data.lang)), ); --- { /* TODO: What about and ? */ } { translations.length > 0 && ( ) }