File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
website2/src/app/clean-air-forum/glossary Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,12 @@ const GlossaryPage: React.FC = () => {
3636 const glossaryHTML = renderContent ( selectedEvent . glossary_details ) ;
3737 const showGlossaryMain = isValidGlossaryContent ( glossaryHTML ) ;
3838
39+ const glossarySections = selectedEvent . sections ?. filter ( ( section : any ) => {
40+ if ( ! section . pages . includes ( 'glossary' ) ) return false ;
41+ const html = renderContent ( section . content ) ;
42+ return html . trim ( ) . length > 0 ;
43+ } ) ;
44+
3945 return (
4046 < div className = "px-4 lg:px-0 prose max-w-none flex flex-col gap-6" >
4147 < Divider className = "bg-black p-0 m-0 h-[1px] w-full" />
@@ -95,9 +101,9 @@ const GlossaryPage: React.FC = () => {
95101 ) }
96102
97103 { /* Additional Glossary Sections (if any) */ }
98- { selectedEvent . sections && selectedEvent . sections . length > 0 && (
104+ { glossarySections && glossarySections . length > 0 && (
99105 < >
100- { selectedEvent . sections . map ( ( section : any ) => (
106+ { glossarySections . map ( ( section : any ) => (
101107 < SectionDisplay key = { section . id } section = { section } />
102108 ) ) }
103109 </ >
You can’t perform that action at this time.
0 commit comments