diff --git a/apps/cowswap-frontend/src/modules/trade/containers/TradeWidgetLinks/index.tsx b/apps/cowswap-frontend/src/modules/trade/containers/TradeWidgetLinks/index.tsx index fb8bb55242..cb7c298f86 100644 --- a/apps/cowswap-frontend/src/modules/trade/containers/TradeWidgetLinks/index.tsx +++ b/apps/cowswap-frontend/src/modules/trade/containers/TradeWidgetLinks/index.tsx @@ -87,22 +87,22 @@ export function TradeWidgetLinks({ location.pathname, highlightedBadgeText, highlightedBadgeType, - handleMenuItemClick + handleMenuItemClick, ]) const singleMenuItem = menuItemsElements.length === 1 + const selectedMenuItem = menuItemsElements.find((item) => item.props.isActive) || menuItemsElements[0] + return isDropdown ? ( <> !singleMenuItem && setDropdownVisible(!isDropdownVisible)} isDropdownVisible={isDropdownVisible} > - item.props.isActive)?.props.routePath || '#'}> - - {menuItemsElements.find((item) => item.props.isActive)?.props.item.label} - {!singleMenuItem ? : null} - + + {selectedMenuItem.props.item.label} + {!singleMenuItem ? : null}