11import React , { FC , memo , useEffect , useMemo , useRef , useState } from 'react' ;
2+ import classNames from 'classnames' ;
23
34import { JSReportWrapper } from './JSReportWrapper' ;
45import { QueryReportWrapper } from './QueryReportWrapper' ;
@@ -110,9 +111,12 @@ const TabbedReportPanelComponent: FC<TabbedReportPanelProps> = ({
110111 { /* First Layer: Categories (Top Level - Primary Navigation) */ }
111112 < ul className = "nav nav-tabs category-tabs" >
112113 { categories . map ( category => (
113- < li className = { activeCategory === category ? 'active' : '' } key = { category } >
114+ < li className = { classNames ( { active : activeCategory === category } ) } key = { category } >
114115 < button
115- className = { activeCategory === category ? 'category-tab-active' : 'category-tab' }
116+ className = { classNames ( {
117+ 'category-tab-active' : activeCategory === category ,
118+ 'category-tab' : activeCategory !== category ,
119+ } ) }
116120 onClick = { ( ) => handleCategoryClick ( category ) }
117121 type = "button"
118122 >
@@ -126,9 +130,12 @@ const TabbedReportPanelComponent: FC<TabbedReportPanelProps> = ({
126130 { activeCategory && activeCategoryReports ?. length > 0 && (
127131 < ul className = "nav nav-tabs report-tabs" >
128132 { activeCategoryReports . map ( report => (
129- < li className = { activeTabId === report . id ? 'active' : '' } key = { report . id } >
133+ < li className = { classNames ( { active : activeTabId === report . id } ) } key = { report . id } >
130134 < button
131- className = { activeTabId === report . id ? 'report-tab-active' : 'report-tab' }
135+ className = { classNames ( {
136+ 'report-tab-active' : activeTabId === report . id ,
137+ 'report-tab' : activeTabId !== report . id ,
138+ } ) }
132139 onClick = { ( ) => {
133140 setUserSelectedTabId ( report . id ) ;
134141 onTabChange ( report . id ) ;
0 commit comments