28 lines
684 B
TypeScript
28 lines
684 B
TypeScript
import { getPosts } from '@/lib/posts'
|
|
import { PostCard } from '@/components/blog/PostCard'
|
|
import Template from '../template'
|
|
|
|
export const metadata = { title: 'Posts' }
|
|
|
|
export default async function PostsPage() {
|
|
const posts = await getPosts()
|
|
|
|
return (
|
|
<Template>
|
|
<main className="max-w-4xl mx-auto px-6 py-16">
|
|
<h1 className="heading-xl text-ink mt-0 mb-12">
|
|
Posts
|
|
</h1>
|
|
<div className="space-y-12">
|
|
{posts.map((post) => (
|
|
<PostCard key={post.slug} {...post} />
|
|
))}
|
|
{posts.length === 0 && (
|
|
<p className="text-ink-soft">No posts yet.</p>
|
|
)}
|
|
</div>
|
|
</main>
|
|
</Template>
|
|
)
|
|
}
|