Files
blog-manager/app/page.tsx
2026-11-01 13:23:44 -05:00

19 lines
494 B
TypeScript

import PostTable from "@/components/PostTable";
import { categoryCounts, readPosts } from "@/lib/store";
export const dynamic = "force-dynamic";
export default async function PostsPage() {
const { posts, revision } = await readPosts();
const sorted = [...posts].sort((a, b) => b.date.localeCompare(a.date));
return (
<main>
<PostTable
posts={sorted}
revision={revision}
categories={categoryCounts(posts).map((c) => c.name)}
/>
</main>
);
}