--- import Gallery from "../../layouts/Gallery.astro"; import Image from "../../components/Image.astro"; import pb from "../../lib/pb"; const { slug } = Astro.params; const imageCollection = await pb.collection("images").getFullList({ sort: "-created", filter: `(character.slug?~"${slug}")`, }); const characterDetails = await pb .collection("characters") .getFirstListItem(`(slug~"${slug}")`); const images = imageCollection.map((record) => { const url = pb.files.getUrl(record, record.file, { thumb: record.thumb }); return { url: url, desc: record.description, nsfw: record.nsfw, artist: record.artist, }; }); export const prerender = false; ---

{characterDetails.name}

{ characterDetails.description && (
) }
{ images.map((image) => ( {image?.desc} )) }