feat: add fuzzy post search
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { getPosts } from '@/lib/posts'
|
||||
import { PostCard } from '@/components/blog/PostCard'
|
||||
import { PostSearch } from '@/components/blog/PostSearch'
|
||||
import Template from '../template'
|
||||
|
||||
export const metadata = { title: 'Posts' }
|
||||
@@ -13,14 +13,7 @@ export default async function PostsPage() {
|
||||
<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>
|
||||
<PostSearch posts={posts} />
|
||||
</main>
|
||||
</Template>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user