mirror of
https://github.com/ChenQihan666/MyBlog-Next.git
synced 2026-08-14 11:01:42 +08:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user