From 1e4a4c96b89d2251f7370b9fd3be862615843de0 Mon Sep 17 00:00:00 2001 From: Kamran Ahmed Date: Fri, 31 Jan 2025 14:50:59 +0000 Subject: [PATCH] Fix type issue --- src/components/FeaturedGuides.astro | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/FeaturedGuides.astro b/src/components/FeaturedGuides.astro index 4f0fe733e..3d78a90b8 100644 --- a/src/components/FeaturedGuides.astro +++ b/src/components/FeaturedGuides.astro @@ -1,7 +1,7 @@ --- import type { GuideFileType } from '../lib/guide'; import GuideListItem from './GuideListItem.astro'; -import { QuestionGroupType } from '../lib/question-group'; +import type { QuestionGroupType } from '../lib/question-group'; export interface Props { heading: string; @@ -15,8 +15,8 @@ const sortedGuides: (QuestionGroupType | GuideFileType)[] = [ ...guides, ...questions, ].sort((a, b) => { - const aDate = new Date(a.frontmatter.date); - const bDate = new Date(b.frontmatter.date); + const aDate = new Date(a.frontmatter.date as string); + const bDate = new Date(b.frontmatter.date as string); return bDate.getTime() - aDate.getTime(); });