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

bahar/landing_on_dtrader_responsive_page_frequently_after_clicking_cashier #4917

8 changes: 2 additions & 6 deletions packages/account/src/Containers/account.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const PageOverlayWrapper = ({
<PageOverlay
header={selected_route.getTitle()}
onClickClose={onClickClose}
is_close_disabled={!!platforms[platform]}
is_from_app={!!platforms[platform]}
>
<selected_route.component component_icon={selected_route.icon_component} />
</PageOverlay>
Expand All @@ -75,11 +75,7 @@ const PageOverlayWrapper = ({
}

return (
<PageOverlay
header={localize('Settings')}
onClickClose={onClickClose}
is_close_disabled={!!platforms[platform]}
>
<PageOverlay header={localize('Settings')} onClickClose={onClickClose} is_from_app={!!platforms[platform]}>
<VerticalTab
alignment='center'
is_floating
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import PropTypes from 'prop-types';
import React from 'react';
import { withRouter } from 'react-router';
import { Button, Modal, Icon, Text } from '@deriv/components';
import { formatMoney, getCurrencyDisplayCode, isMobile, routes } from '@deriv/shared';
import { formatMoney, getCurrencyDisplayCode, isMobile, platforms, routes } from '@deriv/shared';
import { localize, Localize } from '@deriv/translations';
import { connect } from 'Stores/connect';
import 'Sass/account-transfer-receipt.scss';
Expand All @@ -12,6 +12,7 @@ const AccountTransferReceipt = ({
enableApp,
history,
loginid,
platform,
receipt,
resetAccountTransfer,
selected_from,
Expand Down Expand Up @@ -106,14 +107,16 @@ const AccountTransferReceipt = ({
</div>
</div>
<div className='account-transfer-receipt__crypto--form-submit'>
<Button
className='account-transfer-receipt__button'
has_effect
text={localize('View transaction details')}
onClick={checkAccount}
secondary
large
/>
{!platforms[platform] && (
<Button
className='account-transfer-receipt__button'
has_effect
text={localize('View transaction details')}
onClick={checkAccount}
secondary
large
/>
)}
<Button
className='account-transfer-receipt__button'
has_effect
Expand Down Expand Up @@ -158,6 +161,7 @@ AccountTransferReceipt.propTypes = {
disableApp: PropTypes.func,
enableApp: PropTypes.func,
loginid: PropTypes.string,
platform: PropTypes.string,
receipt: PropTypes.object,
resetAccountTransfer: PropTypes.func,
selected_from: PropTypes.object,
Expand All @@ -166,14 +170,15 @@ AccountTransferReceipt.propTypes = {
};

export default withRouter(
connect(({ client, modules, ui }) => ({
connect(({ client, common, modules, ui }) => ({
disableApp: ui.disableApp,
enableApp: ui.enableApp,
loginid: client.loginid,
switchAccount: client.switchAccount,
platform: common.platform,
receipt: modules.cashier.account_transfer.receipt,
resetAccountTransfer: modules.cashier.account_transfer.resetAccountTransfer,
selected_from: modules.cashier.account_transfer.selected_from,
selected_to: modules.cashier.account_transfer.selected_to,
disableApp: ui.disableApp,
enableApp: ui.enableApp,
switchAccount: client.switchAccount,
}))(AccountTransferReceipt)
);
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ PageOverlay.propTypes = {
children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),
header: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
is_close_disabled: PropTypes.bool,
is_from_app: PropTypes.bool,
is_open: PropTypes.bool,
onClickClose: PropTypes.func,
portal_id: PropTypes.string,
Expand Down
11 changes: 9 additions & 2 deletions packages/trader/src/Modules/Reports/Containers/reports.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
SelectNative,
Loading,
} from '@deriv/components';
import { getSelectedRoute } from '@deriv/shared';
import { getSelectedRoute, platforms } from '@deriv/shared';
import { localize } from '@deriv/translations';
import { connect } from 'Stores/connect';
import 'Sass/app/modules/reports.scss';
Expand All @@ -22,6 +22,7 @@ const Reports = ({
is_logging_in,
is_visible,
location,
platform,
routeBackInApp,
routes,
setTabIndex,
Expand Down Expand Up @@ -67,7 +68,11 @@ const Reports = ({
return (
<FadeWrapper is_visible={is_visible} className='reports-page-wrapper' keyname='reports-page-wrapper'>
<div className='reports'>
<PageOverlay header={localize('Reports')} onClickClose={onClickClose}>
<PageOverlay
header={localize('Reports')}
onClickClose={onClickClose}
is_from_app={!!platforms[platform]}
>
<DesktopWrapper>
<VerticalTab
alignment='center'
Expand Down Expand Up @@ -111,6 +116,7 @@ Reports.propTypes = {
is_logging_in: PropTypes.bool,
is_visible: PropTypes.bool,
location: PropTypes.object,
platform: PropTypes.string,
routeBackInApp: PropTypes.func,
routes: PropTypes.arrayOf(PropTypes.object),
setTabIndex: PropTypes.func,
Expand All @@ -123,6 +129,7 @@ export default connect(({ client, common, ui }) => ({
is_logged_in: client.is_logged_in,
is_logging_in: client.is_logging_in,
is_visible: ui.is_reports_visible,
platform: common.platform,
routeBackInApp: common.routeBackInApp,
setVisibilityRealityCheck: client.setVisibilityRealityCheck,
setTabIndex: ui.setReportsTabIndex,
Expand Down