Skip to content

Commit

Permalink
Amina/fix: reports_page_visible_in_cashier_and_account_settings_page (#…
Browse files Browse the repository at this point in the history
…8179)

* fix: reports_page_visible_in_cashier_and_account_settings_page

* chore: trigger_circleci
  • Loading branch information
amina-deriv authored Apr 18, 2023
1 parent 343e032 commit 9fe7dcd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions packages/core/src/App/Components/Layout/Header/menu-links.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,18 +85,17 @@ const CashierTab = observer(() => {
);
});

const MenuLinks = observer(() => {
const MenuLinks = observer(({ is_traders_hub_routes = false }) => {
const { i18n } = useTranslation();
const { client, ui } = useStore();
const { is_logged_in } = client;
const { is_mobile } = ui;
const is_traders_hub = window.location.pathname === routes.traders_hub;

if (!is_logged_in) return <></>;

return (
<div key={`menu-links__${i18n.language}`} className='header__menu-links'>
{!is_traders_hub && <ReportTab />}
{!is_traders_hub_routes && <ReportTab />}
{!is_mobile && <CashierTab />}
</div>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ const TradingHubHeader = ({
<Divider />
<TradersHubHomeButton is_dark_mode={is_dark_mode} />
</DesktopWrapper>
<MenuLinks />
<MenuLinks is_traders_hub_routes />
</div>
<DesktopWrapper>
<div className='trading-hub-header__menu-right'>
Expand Down

1 comment on commit 9fe7dcd

@vercel
Copy link

@vercel vercel bot commented on 9fe7dcd Apr 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

deriv-app – ./

deriv-app.vercel.app
binary.sx
deriv-app.binary.sx
deriv-app-git-master.binary.sx

Please sign in to comment.