"use client"; import Image from "next/image"; import { ArrowLeft, Play, Heart, Bookmark, MessageCircle, Share2, ExternalLink } from "lucide-react"; import { useRouter } from "next/navigation"; import { getPlatformConfig } from "@muse/shared"; import { formatCount, formatTime } from "@/lib/format"; import { FavoriteButton } from "@/components/common/FavoriteButton"; import type { ContentItem } from "@muse/shared"; import { useState } from "react"; interface DetailPanelProps { item: ContentItem; } const STAT_ITEMS = [ { key: "play_count" as const, label: "播放", icon: Play }, { key: "like_count" as const, label: "点赞", icon: Heart }, { key: "collect_count" as const, label: "收藏", icon: Bookmark }, { key: "comment_count" as const, label: "评论", icon: MessageCircle }, { key: "share_count" as const, label: "分享", icon: Share2 }, ]; export function DetailPanel({ item }: DetailPanelProps) { const router = useRouter(); const platform = getPlatformConfig(item.platform); const [imgError, setImgError] = useState(false); return (
{item.author_name}
{item.publish_time && ({formatTime(item.publish_time)}
)}