fix: refactor VERTICALS constant to config file to fix server build
Some checks failed
Deploy Fediversion / deploy (push) Failing after 1s
Some checks failed
Deploy Fediversion / deploy (push) Failing after 1s
This commit is contained in:
parent
b2c1ce6ef5
commit
9e927c114e
7 changed files with 21 additions and 21 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import { notFound } from "next/navigation"
|
||||
import { VERTICALS } from "@/contexts/vertical-context"
|
||||
import { VERTICALS } from "@/config/verticals"
|
||||
|
||||
interface Props {
|
||||
params: { vertical: string }
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { VERTICALS } from "@/contexts/vertical-context"
|
||||
import { VERTICALS } from "@/config/verticals"
|
||||
import { notFound } from "next/navigation"
|
||||
import { getApiUrl } from "@/lib/api-config"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { VERTICALS } from "@/contexts/vertical-context"
|
||||
import { VERTICALS } from "@/config/verticals"
|
||||
import { notFound } from "next/navigation"
|
||||
import { getApiUrl } from "@/lib/api-config"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { VERTICALS } from "@/contexts/vertical-context"
|
||||
import { VERTICALS } from "@/config/verticals"
|
||||
import { notFound } from "next/navigation"
|
||||
import { getApiUrl } from "@/lib/api-config"
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,8 @@ import {
|
|||
SheetTitle,
|
||||
SheetTrigger,
|
||||
} from "@/components/ui/sheet"
|
||||
import { useVertical, VERTICALS, VerticalSlug } from "@/contexts/vertical-context"
|
||||
import { useVertical } from "@/contexts/vertical-context"
|
||||
import { VERTICALS, VerticalSlug } from "@/config/verticals"
|
||||
import { useState } from "react"
|
||||
|
||||
export function BandSelector() {
|
||||
|
|
|
|||
14
frontend/config/verticals.ts
Normal file
14
frontend/config/verticals.ts
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
export const VERTICALS = [
|
||||
{ slug: "goose", name: "Goose" },
|
||||
{ slug: "phish", name: "Phish" },
|
||||
{ slug: "grateful-dead", name: "Grateful Dead" },
|
||||
{ slug: "dead-and-company", name: "Dead & Company" },
|
||||
{ slug: "billy-strings", name: "Billy Strings" },
|
||||
] as const
|
||||
|
||||
export type VerticalSlug = typeof VERTICALS[number]["slug"]
|
||||
|
||||
export interface Vertical {
|
||||
slug: VerticalSlug
|
||||
name: string
|
||||
}
|
||||
|
|
@ -2,22 +2,7 @@
|
|||
|
||||
import { createContext, useContext, useState, useEffect, ReactNode } from "react"
|
||||
import { usePathname } from "next/navigation"
|
||||
|
||||
// Supported verticals (bands)
|
||||
export const VERTICALS = [
|
||||
{ slug: "goose", name: "Goose" },
|
||||
{ slug: "phish", name: "Phish" },
|
||||
{ slug: "grateful-dead", name: "Grateful Dead" },
|
||||
{ slug: "dead-and-company", name: "Dead & Company" },
|
||||
{ slug: "billy-strings", name: "Billy Strings" },
|
||||
] as const
|
||||
|
||||
export type VerticalSlug = typeof VERTICALS[number]["slug"]
|
||||
|
||||
export interface Vertical {
|
||||
slug: VerticalSlug
|
||||
name: string
|
||||
}
|
||||
import { VERTICALS, Vertical, VerticalSlug } from "@/config/verticals"
|
||||
|
||||
interface VerticalContextType {
|
||||
current: Vertical
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue