refactor: replace 'any' type with CollectionEntry for better type safety in PostCard and PostPage components
This commit is contained in:
1 parent
ad33c58dc7
commit
66f3ee8543
2 files changed
+19
-20
No files matched your search
@@ -1,5 +1,6 @@
|
||||
---
|
||||
import path from "node:path";
|
||||
import type { CollectionEntry } from "astro:content";
|
||||
import { Icon } from "astro-icon/components";
|
||||
import I18nKey from "../i18n/i18nKey";
|
||||
import { i18n } from "../i18n/translation";
|
||||
@@ -9,8 +10,7 @@ import ImageWrapper from "./misc/ImageWrapper.astro";
|
||||
|
||||
interface Props {
|
||||
class?: string;
|
||||
// biome-ignore lint/suspicious/noExplicitAny: <explanation>
|
||||
entry: any;
|
||||
entry: CollectionEntry<"posts">;
|
||||
title: string;
|
||||
url: string;
|
||||
published: Date;
|
||||
|
||||
Reference in new issue
Block a user