import { ArrowLeft, MessageCircle, Pin, Star } from "lucide-react" import Image from "next/image" import Link from "next/link" import { notFound } from "next/navigation" import { PostComments } from "@/components/post-comments" import { PostLikeButton } from "@/components/post-like-button" import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar" import { Badge } from "@/components/ui/badge" import { Card, CardContent, CardHeader } from "@/components/ui/card" import { Separator } from "@/components/ui/separator" import { getOrderById, getPlayerById, getPostById, listCommentsByPost } from "@/lib/api" import { roleLabels } from "@/lib/constants" export default async function PostDetailPage({ params }: { params: Promise<{ id: string }> }) { const { id } = await params const post = getPostById(id) if (!post) notFound() const comments = listCommentsByPost(id) const linkedOrder = post.linkedOrderId ? getOrderById(post.linkedOrderId) : null const linkedPlayer = linkedOrder ? getPlayerById(linkedOrder.playerId) : null return (
{post.content}
{post.images.length > 0 && ({linkedOrder.service.gameName} · {linkedOrder.service.title} · 评分{" "} {linkedPlayer?.rating ?? "--"}