--- import AppLayout from "components/AppLayout/AppLayout.astro"; import { payload } from "src/shared/payload/payload-sdk"; import RichText from "components/RichText/RichText.astro"; import FoldersSection from "./_components/FoldersSection.astro"; import { fetchOr404 } from "src/utils/responses"; import ErrorMessage from "components/ErrorMessage.astro"; import { getI18n } from "src/i18n/i18n"; import CollectiblePreview from "components/Previews/CollectiblePreview.astro"; import PagePreview from "components/Previews/PagePreview.astro"; import { formatRichTextToString } from "src/utils/format"; const { slug } = Astro.params; const folder = await fetchOr404(() => payload.getFolder(slug!)); if (folder instanceof Response) { return folder; } const { getLocalizedMatch } = await getI18n(Astro.locals.currentLocale); const meta = getLocalizedMatch(folder.translations); // TODO: handle light and dark illustration for applayout --- {/* ------------------------------------------- HTML ------------------------------------------- */} { meta.description && (
) }
{ folder.sections.type === "single" ? ( ) : (
{folder.sections.sections.map(({ subfolders, translations }) => ( (translations).name } /> ))}
) }
{ folder.files.map(({ relationTo, value }) => { switch (relationTo) { case "collectibles": return ; case "pages": return ; default: return ( ); } }) }
{/* ------------------------------------------- CSS -------------------------------------------- */}