diff --git a/src/components/Testimonials.astro b/src/components/Testimonials.astro index 905f9e3b2..2856ef8a8 100644 --- a/src/components/Testimonials.astro +++ b/src/components/Testimonials.astro @@ -6,8 +6,19 @@ interface Props { names: string[]; } -const names = _(Astro.props.names); +const defaultNames = [ + 'adam-cuddihy', + 'anonymous', + 'huw-davies', + 'michael-itkoff', + 'mick-felton', + 'scott-euser', +]; + +const names = _(Astro.props.names || defaultNames); + const testimonials = await getCollection('testimonial', ({ id }) => names.includes(id)); + const sortedTestimonials = _(testimonials) .sort((a, b) => new Date(a.date) < new Date(b.date)) .reverse()