fix: replace placeholder text with actual image rendering in post detail

This commit is contained in:
zetaloop
2026-02-20 20:06:52 +08:00
parent 104e7c5291
commit 1329b75806
+3 -5
View File
@@ -1,4 +1,5 @@
import { ArrowLeft, Heart, MessageCircle, Pin, Star } from "lucide-react"
import Image from "next/image"
import Link from "next/link"
import { notFound } from "next/navigation"
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"
@@ -63,11 +64,8 @@ export default async function PostDetailPage({ params }: { params: Promise<{ id:
{post.images.length > 0 && (
<div className="flex gap-2 flex-wrap">
{post.images.map((img) => (
<div
key={img}
className="h-40 w-40 rounded-md bg-muted flex items-center justify-center text-xs text-muted-foreground"
>
<div key={img} className="relative h-40 w-40 rounded-md overflow-hidden bg-muted">
<Image src={img} alt="帖子图片" fill className="object-cover" />
</div>
))}
</div>