fix: admin shows venue display + add Nugs/Bandcamp links to public shows
Some checks are pending
Deploy Elmeg / deploy (push) Waiting to run

This commit is contained in:
fullsizemalt 2025-12-24 13:41:47 -08:00
parent 2df93a75e4
commit b5cce827e2
2 changed files with 41 additions and 4 deletions

View file

@ -20,12 +20,17 @@ import {
import { Label } from "@/components/ui/label" import { Label } from "@/components/ui/label"
import Link from "next/link" import Link from "next/link"
interface Venue {
name: string
city?: string
state?: string
}
interface Show { interface Show {
id: number id: number
date: string date: string
slug: string slug: string
venue_name?: string venue?: Venue
venue_city?: string
notes: string | null notes: string | null
nugs_link: string | null nugs_link: string | null
bandcamp_link: string | null bandcamp_link: string | null
@ -166,8 +171,8 @@ export default function AdminShowsPage() {
</Link> </Link>
</td> </td>
<td className="p-3"> <td className="p-3">
<p className="font-medium">{show.venue_name || "Unknown Venue"}</p> <p className="font-medium">{show.venue?.name || "Unknown Venue"}</p>
<p className="text-sm text-muted-foreground">{show.venue_city}</p> <p className="text-sm text-muted-foreground">{show.venue?.city}{show.venue?.state ? `, ${show.venue.state}` : ""}</p>
</td> </td>
<td className="p-3 flex gap-1"> <td className="p-3 flex gap-1">
{show.nugs_link && <Badge variant="outline" className="text-xs">Nugs</Badge>} {show.nugs_link && <Badge variant="outline" className="text-xs">Nugs</Badge>}

View file

@ -135,6 +135,38 @@ export default async function ShowDetailPage({ params }: { params: Promise<{ slu
</div> </div>
)} )}
{/* External Links */}
{(show.nugs_link || show.bandcamp_link) && (
<div className="flex flex-wrap gap-3">
{show.nugs_link && (
<a
href={show.nugs_link}
target="_blank"
rel="noopener noreferrer"
className="inline-flex items-center gap-2 px-4 py-2 rounded-lg bg-orange-500/10 border border-orange-500/30 text-orange-600 dark:text-orange-400 hover:bg-orange-500/20 transition-colors text-sm font-medium"
>
<svg className="h-4 w-4" viewBox="0 0 24 24" fill="currentColor">
<circle cx="12" cy="12" r="10" />
</svg>
Listen on Nugs.net
</a>
)}
{show.bandcamp_link && (
<a
href={show.bandcamp_link}
target="_blank"
rel="noopener noreferrer"
className="inline-flex items-center gap-2 px-4 py-2 rounded-lg bg-blue-500/10 border border-blue-500/30 text-blue-600 dark:text-blue-400 hover:bg-blue-500/20 transition-colors text-sm font-medium"
>
<svg className="h-4 w-4" viewBox="0 0 24 24" fill="currentColor">
<path d="M0 18.75l7.437-13.5H24l-7.438 13.5H0z" />
</svg>
Listen on Bandcamp
</a>
)}
</div>
)}
<div className="grid gap-6 md:grid-cols-[2fr_1fr]"> <div className="grid gap-6 md:grid-cols-[2fr_1fr]">
<div className="flex flex-col gap-6"> <div className="flex flex-col gap-6">
{/* Full Show Video */} {/* Full Show Video */}