refactor: update component props and improve types (#600)

- stop exporting component Props
- replace interface with type for component Props
- enhance dynamic rendering in several components
This commit is contained in:
Sat Naing
2026-01-05 22:56:38 +07:00
committed by GitHub
parent f5f863f9d2
commit 7141d82dbd
9 changed files with 40 additions and 53 deletions
+2 -2
View File
@@ -4,9 +4,9 @@ import PostDetails from "@/layouts/PostDetails.astro";
import getSortedPosts from "@/utils/getSortedPosts";
import { getPath } from "@/utils/getPath";
export interface Props {
type Props = {
post: CollectionEntry<"blog">;
}
};
export async function getStaticPaths() {
const posts = await getCollection("blog", ({ data }) => !data.draft);