From d929ce1fefd5c509a83b44439324b57249066be7 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 cc0bc5a..9d32eac 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 a28b90a..dfeb001 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; }