Skip to content

Commit

Permalink
fix: close_button_on_responsive (#7465)
Browse files Browse the repository at this point in the history
  • Loading branch information
amina-deriv committed Feb 1, 2023
1 parent 5745911 commit 97ee690
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions packages/account/src/Containers/account.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,15 @@ const PageOverlayWrapper = ({
subroutes,
history,
}) => {
const is_from_traders_hub = () => (is_pre_appstore ? history.push(shared_routes.traders_hub) : onClickClose());
const routeToPrevious = () => (is_pre_appstore ? history.push(shared_routes.traders_hub) : onClickClose());

if (isMobile() && selected_route) {
return (
<PageOverlay header={selected_route.getTitle()} onClickClose={onClickClose} is_from_app={is_from_derivgo}>
<PageOverlay
header={selected_route.getTitle()}
onClickClose={routeToPrevious}
is_from_app={is_from_derivgo}
>
<selected_route.component component_icon={selected_route.icon_component} />
</PageOverlay>
);
Expand All @@ -89,7 +93,7 @@ const PageOverlayWrapper = ({
}

return (
<PageOverlay header={localize('Settings')} onClickClose={is_from_traders_hub} is_from_app={is_from_derivgo}>
<PageOverlay header={localize('Settings')} onClickClose={routeToPrevious} is_from_app={is_from_derivgo}>
<VerticalTab
alignment='center'
is_floating
Expand Down

1 comment on commit 97ee690

@vercel
Copy link

@vercel vercel bot commented on 97ee690 Feb 1, 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-git-master.binary.sx
deriv-app.binary.sx

Please sign in to comment.