Skip to content

Commit

Permalink
refactor: apply suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
rostislav-deriv committed Nov 15, 2023
1 parent e5bccc4 commit 6376c57
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
position: relative;

&__group-title {
margin-bottom: 0.8rem;
margin-left: 1.6rem;
margin: 0 0 0.8rem 1.6rem;

@include mobile {
margin-left: 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
max-width: 80rem;

&__group-title {
margin-bottom: 0.8rem;
margin-left: 1.6rem;
margin: 0 0 0.8rem 1.6rem;

@include mobile {
margin-left: 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,26 +34,27 @@ const TransactionsCryptoRow: React.FC<TProps> = ({ transaction }) => {
}, [modal, mutate, transaction.id]);

const onCancelButtonClick = useCallback(() => {
modal.show(
<WalletActionModal
actionButtonsOptions={[
{
onClick: modal.hide,
text: "No, don't cancel",
},
{
isPrimary: true,
onClick: cancelTransaction,
text: 'Yes, cancel',
},
]}
description='Are you sure you want to cancel this transaction?'
hideCloseButton
title='Cancel transaction'
/>,
{ defaultRootId: 'wallets_modal_root' }
);
}, [cancelTransaction, modal]);
if (isMobile)
modal.show(
<WalletActionModal
actionButtonsOptions={[
{
onClick: modal.hide,
text: "No, don't cancel",
},
{
isPrimary: true,
onClick: cancelTransaction,
text: 'Yes, cancel',
},
]}
description='Are you sure you want to cancel this transaction?'
hideCloseButton
title='Cancel transaction'
/>,
{ defaultRootId: 'wallets_modal_root' }
);
}, [cancelTransaction, isMobile, modal]);

const onMobileStatusClick = useCallback(
() =>
Expand Down Expand Up @@ -167,7 +168,7 @@ const TransactionsCryptoRow: React.FC<TProps> = ({ transaction }) => {
</div>
<button
className='wallets-transactions-pending-row__transaction-status'
onClick={isMobile ? onMobileStatusClick : undefined}
onClick={onMobileStatusClick}
ref={statusRef}
>
<Tooltip alignment='left' isVisible={!isMobile && isStatusHovered} message={transaction.description}>
Expand Down

0 comments on commit 6376c57

Please sign in to comment.