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 { Badge } from "@/components/ui/badge" import { getApiUrl } from "@/lib/api-config" import { RatePerformanceDialog } from "@/components/songs/rate-performance-dialog" 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.original_artist}
{song.tags && song.tags.length > 0 && ("{perf.notes}"
)}No performances recorded.
)}