fix: admin shows venue display + add Nugs/Bandcamp links to public shows
Some checks are pending
Deploy Elmeg / deploy (push) Waiting to run
Some checks are pending
Deploy Elmeg / deploy (push) Waiting to run
This commit is contained in:
parent
2df93a75e4
commit
b5cce827e2
2 changed files with 41 additions and 4 deletions
|
|
@ -20,12 +20,17 @@ import {
|
|||
import { Label } from "@/components/ui/label"
|
||||
import Link from "next/link"
|
||||
|
||||
interface Venue {
|
||||
name: string
|
||||
city?: string
|
||||
state?: string
|
||||
}
|
||||
|
||||
interface Show {
|
||||
id: number
|
||||
date: string
|
||||
slug: string
|
||||
venue_name?: string
|
||||
venue_city?: string
|
||||
venue?: Venue
|
||||
notes: string | null
|
||||
nugs_link: string | null
|
||||
bandcamp_link: string | null
|
||||
|
|
@ -166,8 +171,8 @@ export default function AdminShowsPage() {
|
|||
</Link>
|
||||
</td>
|
||||
<td className="p-3">
|
||||
<p className="font-medium">{show.venue_name || "Unknown Venue"}</p>
|
||||
<p className="text-sm text-muted-foreground">{show.venue_city}</p>
|
||||
<p className="font-medium">{show.venue?.name || "Unknown Venue"}</p>
|
||||
<p className="text-sm text-muted-foreground">{show.venue?.city}{show.venue?.state ? `, ${show.venue.state}` : ""}</p>
|
||||
</td>
|
||||
<td className="p-3 flex gap-1">
|
||||
{show.nugs_link && <Badge variant="outline" className="text-xs">Nugs</Badge>}
|
||||
|
|
|
|||
|
|
@ -135,6 +135,38 @@ export default async function ShowDetailPage({ params }: { params: Promise<{ slu
|
|||
</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="flex flex-col gap-6">
|
||||
{/* Full Show Video */}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue