Skip to content

Commit

Permalink
chore: side notes to payment agent list container on mobile (binary-c…
Browse files Browse the repository at this point in the history
  • Loading branch information
jim-deriv authored and nada-deriv committed Aug 23, 2024
1 parent 2bd466f commit b44aefc
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,15 @@
&-second {
margin-top: 1.6rem !important;
}
&-container {
@include mobile-or-tablet-screen {
padding-top: 1.6rem;
margin: 0;
display: flex;
flex-direction: column;
align-content: space-between;
gap: 1.6rem;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import PaymentAgentWithdrawConfirm from '../payment-agent-withdraw-confirm';
import { useCashierStore } from '../../../stores/useCashierStores';
import PaymentAgentReceipt from '../payment-agent-receipt';
import './payment-agent-container.scss';
import PaymentAgentSideNote from '../payment-agent-side-note';
import { useDevice } from '@deriv-com/ui';

type TPaymentAgentContainer = {
is_deposit?: boolean;
Expand Down Expand Up @@ -43,6 +45,8 @@ const PaymentAgentContainer = observer(({ is_deposit }: TPaymentAgentContainer)
supported_banks,
} = payment_agent_store;

const { isDesktop } = useDevice();

React.useEffect(() => {
return () => {
onChangePaymentMethod({ target: { value: '0' } });
Expand Down Expand Up @@ -75,6 +79,9 @@ const PaymentAgentContainer = observer(({ is_deposit }: TPaymentAgentContainer)

return (
<React.Fragment>
<div className='payment-agent-list__side-note-container'>
{!isDesktop ? <PaymentAgentSideNote /> : null}
</div>
<div className='payment-agent-list__list-header'>
{is_deposit ? (
<Text as='p' line_height='s' size='xs'>
Expand Down
6 changes: 1 addition & 5 deletions packages/cashier/src/pages/payment-agent/payment-agent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,7 @@ const PaymentAgent = observer(() => {
}

return (
<PageContainer
hide_breadcrumb
left={!isDesktop ? <PaymentAgentSideNote /> : undefined}
right={isDesktop ? <PaymentAgentSideNote /> : <React.Fragment />}
>
<PageContainer hide_breadcrumb right={isDesktop ? <PaymentAgentSideNote /> : <React.Fragment />}>
<PaymentAgentList />
</PageContainer>
);
Expand Down

0 comments on commit b44aefc

Please sign in to comment.