--- import AppEmptyLayout from "components/AppLayout/AppEmptyLayout.astro"; import Credits from "components/Credits.astro"; import DownloadButton from "components/DownloadButton.astro"; import RichText from "components/RichText/RichText.astro"; import TagGroups from "components/TagGroups.astro"; import { getI18n } from "src/i18n/i18n"; import { payload } from "src/shared/payload/payload-sdk"; import { fetchOr404 } from "src/utils/responses"; const { id } = Astro.params; const image = await fetchOr404(() => payload.getImageByID(id!)); if (image instanceof Response) { return image; } const { getLocalizedMatch } = await getI18n(Astro.locals.currentLocale); const { url, width, height, filename, translations, tagGroups, credits } = image; const { title, description } = translations.length > 0 ? getLocalizedMatch(translations) : { title: filename, description: undefined }; --- {/* ------------------------------------------- HTML ------------------------------------------- */} {title} {description && } {tagGroups.length > 0 && } {credits.length > 0 && } {/* ------------------------------------------- CSS -------------------------------------------- */}