File tree Expand file tree Collapse file tree 11 files changed +40
-49
lines changed
Expand file tree Collapse file tree 11 files changed +40
-49
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import { TooltipProvider } from "@/components/ui/tooltip";
33import { useScrollVisibility } from "@/hooks/useScrollVisibility" ;
44import { TopBar } from "./TopBar" ;
55import { TitleSection } from "./AppHeader/TitleSection" ;
6+ import { FestivalIndicator } from "./AppHeader/FestivalIndicator" ;
67
78interface AppHeaderProps {
89 // Navigation
@@ -50,10 +51,13 @@ export function AppHeader({
5051 showBackButton = { showBackButton }
5152 backLabel = { backLabel }
5253 showGroupsButton = { showGroupsButton }
53- isTitleVisible = { ! shouldShowFestivalIcon }
54- logoUrl = { logoUrl }
55- title = { title }
56- />
54+ >
55+ < FestivalIndicator
56+ isTitleVisible = { ! shouldShowFestivalIcon }
57+ logoUrl = { logoUrl }
58+ title = { title }
59+ />
60+ </ TopBar >
5761
5862 < div ref = { titleRef } >
5963 < TitleSection
Original file line number Diff line number Diff line change 11import { useFestivalEdition } from "@/contexts/FestivalEditionContext" ;
22
33interface FestivalIndicatorProps {
4- isTitleVisible : boolean ;
4+ isTitleVisible ? : boolean ;
55 logoUrl ?: string | null ;
66 title ?: string ;
77}
Original file line number Diff line number Diff line change 11import { useIsMobile } from "@/hooks/use-mobile" ;
22import { AppBranding } from "./AppHeader/AppBranding" ;
3- import { FestivalIndicator } from "./AppHeader/FestivalIndicator" ;
43import { UserActions } from "./AppHeader/UserActions" ;
4+ import { PropsWithChildren } from "react" ;
55
66interface TopBarProps {
77 showBackButton ?: boolean ;
88 backLabel ?: string ;
99 showGroupsButton ?: boolean ;
10-
11- // Festival context
12- isTitleVisible ?: boolean ;
13- logoUrl ?: string | null ;
14- title ?: string ;
1510}
1611
1712export function TopBar ( {
1813 showBackButton = false ,
1914 backLabel = "Back" ,
2015 showGroupsButton = false ,
2116
22- isTitleVisible = false ,
23- logoUrl,
24- title,
25- } : TopBarProps ) {
17+ children,
18+ } : PropsWithChildren < TopBarProps > ) {
2619 const isMobile = useIsMobile ( ) ;
2720
2821 return (
2922 < >
3023 < div className = "fixed top-0 left-0 right-0 z-50 backdrop-blur-md border-b border-purple-400/20 flex items-center px-4 py-3 md:py-4" >
3124 < AppBranding isMobile = { isMobile } />
3225
33- < FestivalIndicator
34- isTitleVisible = { isTitleVisible }
35- logoUrl = { logoUrl }
36- title = { title }
37- />
26+ { children }
3827
3928 < UserActions
4029 showBackButton = { showBackButton }
Original file line number Diff line number Diff line change 11import { Navigate , Route } from "react-router-dom" ;
2- import EditionView from "@/pages/EditionView/EditionView " ;
2+ import EditionLayout from "@/pages/EditionView/EditionLayout " ;
33import { SetDetails } from "@/pages/SetDetails" ;
44import { ExploreSetPage } from "@/pages/ExploreSetPage/ExploreSetPage" ;
55
@@ -22,8 +22,8 @@ export function createEditionRoutes({
2222 WrapperComponent,
2323} : EditionRoutesProps ) {
2424 const EditionComponent = WrapperComponent
25- ? ( ) => < WrapperComponent component = { EditionView } />
26- : EditionView ;
25+ ? ( ) => < WrapperComponent component = { EditionLayout } />
26+ : EditionLayout ;
2727
2828 const SetDetailsComponent = WrapperComponent
2929 ? ( ) => < WrapperComponent component = { SetDetails } />
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import { Festival } from "@/hooks/queries/festivals/types";
1111import { useFestivalEditionBySlugQuery } from "@/hooks/queries/festivals/editions/useFestivalEditionBySlug" ;
1212import { FestivalEdition } from "@/hooks/queries/festivals/editions/types" ;
1313import { getSubdomainInfo } from "@/lib/subdomain" ;
14- import { AppHeader } from "@/components/layout/AppHeader " ;
14+ import { TopBar } from "@/components/layout/TopBar " ;
1515import { useToast } from "@/hooks/use-toast" ;
1616
1717interface FestivalEditionContextType {
@@ -170,10 +170,10 @@ export function FestivalEditionProvider({
170170 < FestivalEditionContext . Provider value = { contextValue } >
171171 < div className = "min-h-screen bg-app-gradient" >
172172 < div className = "container mx-auto px-4 py-8" >
173- < AppHeader
174- backLabel = "Back to Festivals"
175- title = "Festival not found"
176- / >
173+ < TopBar backLabel = "Back to Festivals" />
174+ < h1 className = "text-4xl font-bold text-white text-center mb-8" >
175+ No valid festival or edition found
176+ </ h1 >
177177 < Navigate to = "/" />
178178 </ div >
179179 </ div >
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ import { useFestivalEditionsForFestivalQuery } from "@/hooks/queries/festivals/e
1515import { FestivalEdition } from "@/hooks/queries/festivals/editions/types" ;
1616import { useEffect } from "react" ;
1717import { getSubdomainInfo } from "@/lib/subdomain" ;
18+ import { TopBar } from "@/components/layout/TopBar" ;
1819
1920export default function EditionSelection ( ) {
2021 const { festival } = useFestivalEdition ( ) ;
@@ -80,11 +81,10 @@ export default function EditionSelection() {
8081 return (
8182 < div className = "min-h-screen bg-app-gradient" >
8283 < div className = "container mx-auto px-4 py-8" >
83- < AppHeader
84- showBackButton
85- backLabel = "Back to Festivals"
86- title = { festival . name }
87- />
84+ < TopBar showBackButton backLabel = "Back to Festivals" />
85+ < h1 className = "text-4xl font-bold text-white text-center mb-8" >
86+ { festival . name }
87+ </ h1 >
8888
8989 < div className = "flex items-center justify-center mt-16" >
9090 < Card className = "w-full max-w-md bg-white/10 border-purple-400/30" >
@@ -144,6 +144,8 @@ export default function EditionSelection() {
144144 showBackButton
145145 backLabel = "Back to Festivals"
146146 title = { festival . name }
147+ logoUrl = { festival . logo_url }
148+ showGroupsButton
147149 />
148150
149151 < div className = "mt-12 grid gap-6 md:grid-cols-2 lg:grid-cols-3" >
Original file line number Diff line number Diff line change @@ -5,10 +5,8 @@ import { useFestivalEdition } from "@/contexts/FestivalEditionContext";
55import { Outlet } from "react-router-dom" ;
66
77export default function EditionView ( ) {
8- // Get festival/edition context
98 const { festival, edition, isContextReady } = useFestivalEdition ( ) ;
109
11- // Show loading while context is not ready
1210 if ( ! isContextReady ) {
1311 return (
1412 < div className = "min-h-screen bg-app-gradient flex items-center justify-center" >
@@ -34,7 +32,6 @@ export default function EditionView() {
3432 showGroupsButton
3533 />
3634
37- { /* Main Tab Navigation */ }
3835 < MainTabNavigation />
3936
4037 < div className = "mt-4 md:mt-8" >
Original file line number Diff line number Diff line change 88} from "@/components/ui/card" ;
99import { useFestivalsQuery } from "@/hooks/queries/festivals/useFestivals" ;
1010import { Festival } from "@/hooks/queries/festivals/types" ;
11- import { AppHeader } from "@/components/layout/AppHeader" ;
1211import { useEffect } from "react" ;
1312import {
1413 createFestivalSubdomainUrl ,
@@ -17,6 +16,8 @@ import {
1716import { Link } from "react-router-dom" ;
1817import { useCustomLinksQuery } from "@/hooks/queries/custom-links/useCustomLinks" ;
1918import { PageTitle } from "@/components/PageTitle/PageTitle" ;
19+ import { TopBar } from "@/components/layout/TopBar" ;
20+ import { AppHeader } from "@/components/layout/AppHeader" ;
2021
2122export default function FestivalSelection ( ) {
2223 const { data : availableFestivals = [ ] , isLoading : festivalsLoading } =
@@ -52,7 +53,7 @@ export default function FestivalSelection() {
5253 < div className = "min-h-screen bg-app-gradient" >
5354 < div className = "container mx-auto px-4 py-8" >
5455 < PageTitle title = "Select Festival" />
55- < AppHeader title = "UpLine" />
56+ < TopBar />
5657
5758 < div className = "flex items-center justify-center mt-16" >
5859 < Card className = "w-full max-w-md bg-white/10 border-purple-400/30" >
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import { useAuth } from "@/contexts/AuthContext";
1414import { useVoteCount } from "@/hooks/useVoteCount" ;
1515import { PageTitle } from "@/components/PageTitle/PageTitle" ;
1616import { TopBar } from "@/components/layout/TopBar" ;
17+ import { FestivalIndicator } from "@/components/layout/AppHeader/FestivalIndicator" ;
1718
1819export function SetDetails ( ) {
1920 const { user } = useAuth ( ) ;
@@ -47,11 +48,12 @@ export function SetDetails() {
4748 < PageTitle title = { setTitle } prefix = { festival ?. name } />
4849 < div className = "min-h-screen bg-app-gradient" >
4950 < div className = "container mx-auto px-4 py-8" >
50- < TopBar
51- showBackButton
52- backLabel = "Back to Artists"
53- logoUrl = { festival ?. logo_url }
54- />
51+ < TopBar showBackButton backLabel = "Back to Artists" showGroupsButton >
52+ < FestivalIndicator
53+ title = { festival ?. name }
54+ logoUrl = { festival ?. logo_url }
55+ />
56+ </ TopBar >
5557
5658 { /* Set Header */ }
5759 { isMultiArtistSet ? (
Original file line number Diff line number Diff line change @@ -70,11 +70,7 @@ export default function AdminLayout() {
7070 return (
7171 < div className = "min-h-screen bg-app-gradient" >
7272 < div className = "container mx-auto px-4 py-8" >
73- < TopBar
74- showBackButton
75- backLabel = "Back to app"
76- title = "Admin Dashboard"
77- />
73+ < TopBar showBackButton backLabel = "Back to app" />
7874
7975 < div >
8076 < Tabs
You can’t perform that action at this time.
0 commit comments