import { Button } from "@/components/ui/button" import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card" import { ArrowLeft, Calendar, Music2 } 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 getTour(id: string) { try { const res = await fetch(`${getApiUrl()}/tours/${id}`, { cache: 'no-store' }) if (!res.ok) return null return res.json() } catch (e) { console.error(e) return null } } async function getTourShows(id: string) { try { const res = await fetch(`${getApiUrl()}/shows/?tour_id=${id}`, { cache: 'no-store' }) if (!res.ok) return [] return res.json() } catch (e) { console.error(e) return [] } } export default async function TourDetailPage({ params }: { params: Promise<{ slug: string }> }) { const { slug } = await params const tour = await getTour(slug) if (!tour) { notFound() } const shows = await getTourShows(tour.id) return (
No shows found for this tour.
)}{tour.notes}
)}