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