import { getPosts } from '@/lib/posts'
import { PostSearch } from '@/components/blog/PostSearch'
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>
      <PostSearch posts={posts} />
    </main>
    </Template>
  )
}
