Skip to content

Commit

Permalink
fix: solve modDatetime type errors
Browse files Browse the repository at this point in the history
Update modDatetime props type to have null type for components that have modDatetime as props.
  • Loading branch information
satnaing committed Jan 5, 2024
1 parent c356789 commit d929ce1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/Datetime.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion src/layouts/Layout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export interface Props {
ogImage?: string;
canonicalURL?: string;
pubDatetime?: Date;
modDatetime?: Date;
modDatetime?: Date | null;
scrollSmooth?: boolean;
}
Expand Down

0 comments on commit d929ce1

Please sign in to comment.