--- import AppEmptyLayout from "components/AppLayout/AppEmptyLayout.astro"; import AppLayoutTitle from "components/AppLayout/components/AppLayoutTitle.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"; import ImageTile from "./_components/ImageTile.astro"; import PriceInfo from "./_components/PriceInfo.astro"; import SizeInfo from "./_components/SizeInfo.astro"; import ReleaseDateInfo from "./_components/ReleaseDateInfo.astro"; import PageInfo from "./_components/PageInfo.astro"; import AvailabilityInfo from "./_components/AvailabilityInfo.astro"; import WeightInfo from "./_components/WeightInfo.astro"; import SubitemSection from "./_components/SubitemSection.astro"; import ContentsSection from "./_components/ContentsSection/ContentsSection.astro"; import { formatInlineTitle, formatRichTextToString } from "src/utils/format"; const { slug } = Astro.params; const { getLocalizedMatch, t } = await getI18n(Astro.locals.currentLocale); const collectible = await fetchOr404(() => payload.getCollectible(slug!)); if (collectible instanceof Response) { return collectible; } const { translations, thumbnail, size, price, releaseDate, pageInfo, urls, weight, backgroundImage, gallery, scans, subitems, parentPages, tagGroups, contents, } = collectible; const translation = getLocalizedMatch(translations); const galleryFirstImage = gallery[0]; const scansFirstImage = scans[0]; --- {/* ------------------------------------------- HTML ------------------------------------------- */} { thumbnail && ( ) } { galleryFirstImage && ( ) } { scansFirstImage && ( ) } { translation.description && ( ) } {releaseDate && } {price && } {size && } {weight && } {pageInfo && } {subitems.length > 0 && } {contents.length > 0 && } { galleryFirstImage && ( ) } { scansFirstImage && ( ) } { thumbnail && ( ) } {/* ------------------------------------------- CSS -------------------------------------------- */}