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 { ArrowLeft, Heart, MessageCircle, Pin, Star } from "lucide-react"
|
||||||
|
import Image from "next/image"
|
||||||
import Link from "next/link"
|
import Link from "next/link"
|
||||||
import { notFound } from "next/navigation"
|
import { notFound } from "next/navigation"
|
||||||
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"
|
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 && (
|
{post.images.length > 0 && (
|
||||||
<div className="flex gap-2 flex-wrap">
|
<div className="flex gap-2 flex-wrap">
|
||||||
{post.images.map((img) => (
|
{post.images.map((img) => (
|
||||||
<div
|
<div key={img} className="relative h-40 w-40 rounded-md overflow-hidden bg-muted">
|
||||||
key={img}
|
<Image src={img} alt="帖子图片" fill className="object-cover" />
|
||||||
className="h-40 w-40 rounded-md bg-muted flex items-center justify-center text-xs text-muted-foreground"
|
|
||||||
>
|
|
||||||
图片
|
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user