mirror of
https://github.com/ChenQihan666/MyBlog-Next.git
synced 2026-08-14 11:29:33 +08:00
fix: solve modDatetime type errors
Update modDatetime props type to have null type for components that have modDatetime as props.
This commit is contained in:
@@ -2,7 +2,7 @@ import { LOCALE } from "@config";
|
|||||||
|
|
||||||
interface DatetimesProps {
|
interface DatetimesProps {
|
||||||
pubDatetime: string | Date;
|
pubDatetime: string | Date;
|
||||||
modDatetime: string | Date | undefined;
|
modDatetime: string | Date | undefined | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface Props extends DatetimesProps {
|
interface Props extends DatetimesProps {
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ export interface Props {
|
|||||||
ogImage?: string;
|
ogImage?: string;
|
||||||
canonicalURL?: string;
|
canonicalURL?: string;
|
||||||
pubDatetime?: Date;
|
pubDatetime?: Date;
|
||||||
modDatetime?: Date;
|
modDatetime?: Date | null;
|
||||||
scrollSmooth?: boolean;
|
scrollSmooth?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user