feat(posts): wire community pages to backend posts API
This commit is contained in:
@@ -14,7 +14,7 @@ import { notFound } from "next/navigation"
|
||||
|
||||
export default async function PostDetailPage({ params }: { params: Promise<{ id: string }> }) {
|
||||
const { id } = await params
|
||||
const post = getPostById(id)
|
||||
const post = await getPostById(id)
|
||||
if (!post) notFound()
|
||||
|
||||
const linkedOrder = post.linkedOrderId ? getOrderById(post.linkedOrderId) : null
|
||||
@@ -91,7 +91,11 @@ export default async function PostDetailPage({ params }: { params: Promise<{ id:
|
||||
)}
|
||||
|
||||
<div className="flex items-center gap-4 text-sm text-muted-foreground pt-2">
|
||||
<PostLikeButton postId={post.id} />
|
||||
<PostLikeButton
|
||||
postId={post.id}
|
||||
initialLiked={post.liked}
|
||||
initialLikeCount={post.likeCount}
|
||||
/>
|
||||
<PostCommentCount postId={post.id} />
|
||||
</div>
|
||||
</CardContent>
|
||||
|
||||
Reference in New Issue
Block a user