--- import type { GuideFileType } from '../lib/guide'; import GuideListItem from './GuideListItem.astro'; import { QuestionGroupType } from '../lib/question-group'; export interface Props { heading: string; guides: GuideFileType[]; questions: QuestionGroupType[]; } const { heading, guides, questions = [] } = Astro.props; const sortedGuides: (QuestionGroupType | GuideFileType)[] = [ ...guides, ...questions, ].sort((a, b) => { const aDate = new Date(a.frontmatter.date); const bDate = new Date(b.frontmatter.date); return bDate.getTime() - aDate.getTime(); }); ---