import { Button } from "@/components/ui/button" import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card" import { ArrowLeft, PlayCircle, History } from "lucide-react" import Link from "next/link" import { notFound } from "next/navigation" import { getApiUrl } from "@/lib/api-config" import { CommentSection } from "@/components/social/comment-section" import { EntityRating } from "@/components/social/entity-rating" import { EntityReviews } from "@/components/reviews/entity-reviews" import { SocialWrapper } from "@/components/social/social-wrapper" async function getSong(id: string) { try { const res = await fetch(`${getApiUrl()}/songs/${id}`, { cache: 'no-store' }) if (!res.ok) return null return res.json() } catch (e) { console.error(e) return null } } export default async function SongDetailPage({ params }: { params: Promise<{ id: string }> }) { const { id } = await params const song = await getSong(id) if (!song) { notFound() } return (

{song.title}

{song.original_artist}

{song.tags && song.tags.length > 0 && (
{song.tags.map((tag: any) => ( #{tag.name} ))}
)}
Times Played
{song.times_played}
Gap (Shows)
{song.gap}
Last Played
{song.last_played ? new Date(song.last_played).toLocaleDateString() : "Never"}
Performance History

Performance history coming soon...

{/* We need to fetch performances list here. For now, we leave a placeholder. */}
) }