11import { useFestivalEdition } from "@/contexts/FestivalEditionContext" ;
22import { useFestivalInfoQuery } from "@/hooks/queries/festival-info/useFestivalInfo" ;
3+ import { PageTitle } from "@/components/PageTitle/PageTitle" ;
34import { EditionTitle } from "./InfoTab/EditionTitle" ;
45import { InfoText } from "./InfoTab/InfoText" ;
56import { CustomLinks } from "./InfoTab/CustomLinks" ;
@@ -11,6 +12,7 @@ import { useCustomLinksQuery } from "@/hooks/queries/custom-links/useCustomLinks
1112export function InfoTab ( ) {
1213 const { edition, festival } = useFestivalEdition ( ) ;
1314 const { data : festivalInfo , isLoading } = useFestivalInfoQuery ( festival ?. id ) ;
15+
1416 const customLinksQuery = useCustomLinksQuery ( festival ?. id || "" ) ;
1517 if ( isLoading ) {
1618 return < LoadingInfo /> ;
@@ -24,28 +26,31 @@ export function InfoTab() {
2426 customLinks . length === 0 ;
2527
2628 return (
27- < div className = "space-y-8" >
28- < EditionTitle name = { edition ?. name } />
29-
30- { festivalInfo ?. info_text && (
31- < InfoText infoText = { festivalInfo . info_text } />
32- ) }
33-
34- { customLinks . length > 0 && < CustomLinks links = { customLinks } /> }
35-
36- { festivalInfo ?. facebook_url ? (
37- < SocialLinkItem
38- link = { { title : "Facebook" , url : festivalInfo . facebook_url } }
39- />
40- ) : null }
41-
42- { festivalInfo ?. instagram_url ? (
43- < SocialLinkItem
44- link = { { title : "Instagram" , url : festivalInfo . instagram_url } }
45- />
46- ) : null }
47-
48- { noInfoAvailable && < NoInfo /> }
49- </ div >
29+ < >
30+ < PageTitle title = "Info" prefix = { festival ?. name } />
31+ < div className = "space-y-8" >
32+ < EditionTitle name = { edition ?. name } />
33+
34+ { festivalInfo ?. info_text && (
35+ < InfoText infoText = { festivalInfo . info_text } />
36+ ) }
37+
38+ { customLinks . length > 0 && < CustomLinks links = { customLinks } /> }
39+
40+ { festivalInfo ?. facebook_url ? (
41+ < SocialLinkItem
42+ link = { { title : "Facebook" , url : festivalInfo . facebook_url } }
43+ />
44+ ) : null }
45+
46+ { festivalInfo ?. instagram_url ? (
47+ < SocialLinkItem
48+ link = { { title : "Instagram" , url : festivalInfo . instagram_url } }
49+ />
50+ ) : null }
51+
52+ { noInfoAvailable && < NoInfo /> }
53+ </ div >
54+ </ >
5055 ) ;
5156}
0 commit comments