import { Button } from "@/components/ui/button" import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card" import { ArrowLeft, Calendar, MapPin, Music2, ChevronRight } 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 { EntityReviews } from "@/components/reviews/entity-reviews" import { SocialWrapper } from "@/components/social/social-wrapper" import { EntityRating } from "@/components/social/entity-rating" async function getPerformance(id: string) { try { const res = await fetch(`${getApiUrl()}/performances/${id}`, { cache: 'no-store' }) if (!res.ok) return null return res.json() } catch (e) { console.error(e) return null } } export default async function PerformanceDetailPage({ params }: { params: Promise<{ id: string }> }) { const { id } = await params const performance = await getPerformance(id) if (!performance) { notFound() } return (
{/* Breadcrumbs */} {/* Header */}

{performance.song.title} {performance.nicknames.length > 0 && ( "{performance.nicknames[0].nickname}" )}

{new Date(performance.show.date).toLocaleDateString("en-US", { weekday: "short", year: "numeric", month: "short", day: "numeric" })} {performance.show.venue && ( {performance.show.venue.name}, {performance.show.venue.city} )}
{/* Rating */}
Performance Details
Times Played {performance.times_played}
Gap {performance.gap}
Set {performance.set_name || "-"}
{performance.previous_performance_id ? ( ) : ( )} {performance.next_performance_id ? ( ) : ( )}
{performance.notes && (

Notes

{performance.notes}

)} {performance.segue && (
Segue into next song >
)}
{/* Could add "Other performances of this song" or "Other songs from this show" here */}
) }