import { Button } from "@/components/ui/button" import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card" import { ArrowLeft, Calendar, MapPin, Music2 } from "lucide-react" import Link from "next/link" import { CommentSection } from "@/components/social/comment-section" import { EntityRating } from "@/components/social/entity-rating" import { ShowAttendance } from "@/components/shows/show-attendance" import { SocialWrapper } from "@/components/social/social-wrapper" import { ReviewCard } from "@/components/reviews/review-card" import { ReviewForm } from "@/components/reviews/review-form" import { notFound } from "next/navigation" import { SuggestNicknameDialog } from "@/components/shows/suggest-nickname-dialog" import { EntityReviews } from "@/components/reviews/entity-reviews" import { getApiUrl } from "@/lib/api-config" async function getShow(id: string) { try { const res = await fetch(`${getApiUrl()}/shows/${id}`, { cache: 'no-store' }) if (!res.ok) return null return res.json() } catch (e) { console.error(e) return null } } export default async function ShowDetailPage({ params }: { params: Promise<{ id: string }> }) { const { id } = await params const show = await getShow(id) if (!show) { notFound() } return (

{new Date(show.date).toLocaleDateString()}

{show.tags && show.tags.length > 0 && (
{show.tags.map((tag: any) => ( #{tag.name} ))}
)} {show.tour && (

{show.tour.name}

)}
{show.notes && (
Note: {show.notes}
)}
Setlist {show.performances && show.performances.length > 0 ? (
{show.performances.map((perf: any) => (
{perf.position}.
{perf.song?.title || "Unknown Song"} {perf.segue && >}
{/* Nicknames */} {perf.nicknames && perf.nicknames.length > 0 && (
{perf.nicknames.map((nick: any) => ( "{nick.nickname}" ))}
)} {/* Suggest Nickname Button */}
{/* Rating Column */}
))}
) : (

No setlist data available.

)}
Venue Info {show.venue ? ( <>
{show.venue.name}

{show.venue.city}, {show.venue.state} {show.venue.country}

) : (

Unknown Venue

)}
) }