16 lines
431 B
TypeScript
16 lines
431 B
TypeScript
import PostEditor from "@/components/PostEditor";
|
|
import { categoryCounts, readPosts, tagCounts } from "@/lib/store";
|
|
|
|
export const dynamic = "force-dynamic";
|
|
|
|
export default async function NewPostPage() {
|
|
const { posts, revision } = await readPosts();
|
|
return (
|
|
<PostEditor
|
|
revision={revision}
|
|
categories={categoryCounts(posts).map((c) => c.name)}
|
|
tags={tagCounts(posts).map((t) => t.name)}
|
|
/>
|
|
);
|
|
}
|