fix: replace placeholder text with actual image rendering in post detail
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user