fix: pass year param to shows api
Some checks failed
Deploy Fediversion / deploy (push) Failing after 0s
Some checks failed
Deploy Fediversion / deploy (push) Failing after 0s
This commit is contained in:
parent
18b102558d
commit
0c80904661
1 changed files with 6 additions and 0 deletions
|
|
@ -19,6 +19,7 @@ function ShowsContent() {
|
||||||
// --- State ---
|
// --- State ---
|
||||||
const activeView = searchParams.get("view") || "recent"
|
const activeView = searchParams.get("view") || "recent"
|
||||||
const bandsParam = searchParams.get("bands")
|
const bandsParam = searchParams.get("bands")
|
||||||
|
const yearParam = searchParams.get("year")
|
||||||
const selectedBands = bandsParam ? bandsParam.split(",") : []
|
const selectedBands = bandsParam ? bandsParam.split(",") : []
|
||||||
|
|
||||||
const [shows, setShows] = useState<Show[]>([])
|
const [shows, setShows] = useState<Show[]>([])
|
||||||
|
|
@ -60,6 +61,11 @@ function ShowsContent() {
|
||||||
selectedBands.forEach(b => params.append("vertical_slugs", b))
|
selectedBands.forEach(b => params.append("vertical_slugs", b))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Add year filter
|
||||||
|
if (yearParam) {
|
||||||
|
params.set("year", yearParam)
|
||||||
|
}
|
||||||
|
|
||||||
// Add view-specific params
|
// Add view-specific params
|
||||||
if (activeView === "upcoming") {
|
if (activeView === "upcoming") {
|
||||||
params.set("status", "upcoming")
|
params.set("status", "upcoming")
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue