Skip to content

Commit

Permalink
feat: update mobile header
Browse files Browse the repository at this point in the history
  • Loading branch information
sergei-deriv committed May 24, 2024
1 parent f75ba34 commit 9b7a194
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
3 changes: 1 addition & 2 deletions packages/core/src/App/Components/Layout/Header/menu-link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ const MenuLink = observer(
className={is_trade_text ? '' : 'header__menu-mobile-link-text'}
as='h3'
size='xs'
weight={window.location.pathname === '/' && is_trade_text ? 'bold' : undefined}
weight={window.location.pathname === routes.trade && is_trade_text ? 'bold' : undefined}
>
{text}
</Text>
Expand All @@ -150,7 +150,6 @@ const MenuLink = observer(
'header__menu-mobile-link--disabled': is_disabled,
'header__menu-mobile-link--active': is_active,
})}
active_class='header__menu-mobile-link--active'
onClick={onClickLink}
data-testid={data_testid}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ const ToggleMenuDrawer = observer(({ platform_config }) => {
<Div100vhContainer height_offset='40px'>
<div className='header__menu-mobile-body-wrapper'>
<React.Fragment>
{!is_trading_hub_category && (
{
<MobileDrawer.SubHeader
className={classNames({
'dc-mobile-drawer__subheader--hidden': is_submenu_expanded,
Expand All @@ -328,12 +328,8 @@ const ToggleMenuDrawer = observer(({ platform_config }) => {
setTogglePlatformType={setTogglePlatformType}
/>
</MobileDrawer.SubHeader>
)}
<MobileDrawer.Body
className={classNames({
'header__menu-mobile-traders-hub': is_trading_hub_category,
})}
>
}
<MobileDrawer.Body>
<div className='header__menu-mobile-platform-switcher' id='mobile_platform_switcher' />
<MobileDrawer.Item>
<MenuLink
Expand All @@ -350,19 +346,21 @@ const ToggleMenuDrawer = observer(({ platform_config }) => {
icon={TradersHubIcon}
text={localize("Trader's Hub")}
onClickLink={toggleDrawer}
is_active={route === routes.traders_hub}
/>
</MobileDrawer.Item>
)}
{!is_trading_hub_category && (
{
<MobileDrawer.Item>
<MenuLink
link_to={routes.trade}
icon='IcTrade'
text={localize('Trade')}
onClickLink={toggleDrawer}
is_active={route === routes.trade}
/>
</MobileDrawer.Item>
)}
}
{primary_routes_config.map((route_config, idx) =>
getRoutesWithSubMenu(route_config, idx)
)}
Expand Down

0 comments on commit 9b7a194

Please sign in to comment.