diff --git a/apps/trading/pages/markets/[marketId].page.tsx b/apps/trading/pages/markets/[marketId].page.tsx index e502f4c5c..3d9899b05 100644 --- a/apps/trading/pages/markets/[marketId].page.tsx +++ b/apps/trading/pages/markets/[marketId].page.tsx @@ -100,11 +100,12 @@ const GridTabs = ({ children, group }: GridTabsProps) => { return (
{/* the tabs */} -
+
{Children.map(children, (child) => { if (!isValidElement(child)) return null; + const isActive = query[group] === child.props.name; const buttonClass = classNames('p-8', { - 'text-vega-pink': query[group] === child.props.name, + 'text-vega-pink': isActive, }); return ( @@ -125,7 +130,15 @@ const GridTabs = ({ children, group }: GridTabsProps) => {
{Children.map(children, (child) => { if (isValidElement(child) && query[group] === child.props.name) { - return
{child.props.children}
; + return ( +
+ {child.props.children} +
+ ); } return null; })}