11---
2- import { getCollection } from " astro:content" ;
2+ import { getCollection , render } from " astro:content" ;
33import PageLayout from " ../../layouts/PageLayout.astro" ;
44
55export async function getStaticPaths() {
@@ -9,14 +9,14 @@ export async function getStaticPaths() {
99 const prevTestimonial = testimonialsEntries .at (
1010 (index - 1 ) % testimonialsEntries .length ,
1111 );
12- const prevLink = prevTestimonial && prevTestimonial .slug ;
12+ const prevLink = prevTestimonial && prevTestimonial .id ;
1313 const nextTestimonial = testimonialsEntries .at (
1414 (index + 1 ) % testimonialsEntries .length ,
1515 );
16- const nextLink = nextTestimonial && nextTestimonial .slug ;
16+ const nextLink = nextTestimonial && nextTestimonial .id ;
1717
1818 return {
19- params: { slug : entry .slug },
19+ params: { id : entry .id },
2020 props: {
2121 entry ,
2222 prevLink ,
@@ -28,7 +28,8 @@ export async function getStaticPaths() {
2828}
2929
3030const { entry, prevLink, nextLink, color } = Astro .props ;
31- const { Content } = await entry .render ();
31+ const { Content } = await render (entry );
32+ console .log (entry );
3233const { title, author, profilePicture } = entry .data ;
3334const pageTitle = ` Testimonial of ${title } ` ;
3435const mainTitle = pageTitle ;
0 commit comments