initial commit
This commit is contained in:
18
app/page.tsx
Normal file
18
app/page.tsx
Normal file
@@ -0,0 +1,18 @@
|
||||
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>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user