diff --git a/src/pages/characters/[slug].astro b/src/pages/characters/[slug].astro index 791c774..1abe712 100644 --- a/src/pages/characters/[slug].astro +++ b/src/pages/characters/[slug].astro @@ -1,9 +1,9 @@ --- -import type { GetStaticPaths } from "astro"; +// import type { GetStaticPaths } from "astro"; import Gallery from "../../layouts/Gallery.astro"; import Image from "../../components/Image.astro"; import pb from "../../lib/pb"; -export const getStaticPaths = (async () => { +export async function getStaticPaths() { const paths = await pb .collection("characters") .getFullList({ @@ -13,12 +13,12 @@ export const getStaticPaths = (async () => { // console.log(paths); - return paths.map(({ slug, name }) => { + return paths.map(({ slug }) => { return { params: { slug }, }; }); -}) satisfies GetStaticPaths; +} const { slug } = Astro.params; @@ -39,7 +39,7 @@ const images = imageCollection.map((record) => { }; }); -export const prerender = true +export const prerender = true; ---