From 04236674fd3ce7bf4a6071fb8cf5a4c09e52fa87 Mon Sep 17 00:00:00 2001 From: satnaing Date: Fri, 5 Jan 2024 10:31:44 +0630 Subject: [PATCH] fix: solve modDatetime type errors Update modDatetime props type to have null type for components that have modDatetime as props. --- src/components/Datetime.tsx | 2 +- src/layouts/Layout.astro | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Datetime.tsx b/src/components/Datetime.tsx index cc0bc5afe..9d32eac39 100644 --- a/src/components/Datetime.tsx +++ b/src/components/Datetime.tsx @@ -2,7 +2,7 @@ import { LOCALE } from "@config"; interface DatetimesProps { pubDatetime: string | Date; - modDatetime: string | Date | undefined; + modDatetime: string | Date | undefined | null; } interface Props extends DatetimesProps { diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index a28b90a21..dfeb001a4 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -12,7 +12,7 @@ export interface Props { ogImage?: string; canonicalURL?: string; pubDatetime?: Date; - modDatetime?: Date; + modDatetime?: Date | null; scrollSmooth?: boolean; }