Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Amina/fix: close_button_on_responsive #7465

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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