From 2d0ba8a0834bdd46df0b51af84b9d14c42c11c92 Mon Sep 17 00:00:00 2001 From: kate-deriv <121025168+kate-deriv@users.noreply.github.com> Date: Thu, 15 Jun 2023 13:56:50 +0300 Subject: [PATCH] fix: apply gradient style to all contracts (#132) --- .../positions-drawer-card/positions-drawer-card.jsx | 4 ++-- .../Elements/ContractDrawer/contract-drawer-card.jsx | 4 ++-- .../Elements/PositionsDrawer/positions-modal-card.jsx | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/components/src/components/positions-drawer-card/positions-drawer-card.jsx b/packages/components/src/components/positions-drawer-card/positions-drawer-card.jsx index 6a7f50fc2ac7..c99384cc8298 100644 --- a/packages/components/src/components/positions-drawer-card/positions-drawer-card.jsx +++ b/packages/components/src/components/positions-drawer-card/positions-drawer-card.jsx @@ -55,8 +55,8 @@ const PositionsDrawerCard = ({ const has_ended = !!getEndTime(contract_info); const is_mobile = isMobile(); const contract_card_classname = classNames('dc-contract-card', { - 'dc-contract-card--green': !is_accumulator && !is_multiplier && profit_loss > 0 && !result, - 'dc-contract-card--red': !is_accumulator && !is_multiplier && profit_loss < 0 && !result, + 'dc-contract-card--green': profit_loss > 0 && !result, + 'dc-contract-card--red': profit_loss < 0 && !result, }); const loader_el = ( diff --git a/packages/trader/src/App/Components/Elements/ContractDrawer/contract-drawer-card.jsx b/packages/trader/src/App/Components/Elements/ContractDrawer/contract-drawer-card.jsx index 1d00b717fa2e..182bda5b9cc5 100644 --- a/packages/trader/src/App/Components/Elements/ContractDrawer/contract-drawer-card.jsx +++ b/packages/trader/src/App/Components/Elements/ContractDrawer/contract-drawer-card.jsx @@ -125,8 +125,8 @@ const ContractDrawerCard = observer( >
0 && !result, - 'dc-contract-card--red': is_mobile && !is_multiplier && profit < 0 && !result, + 'dc-contract-card--green': profit > 0 && !result, + 'dc-contract-card--red': profit < 0 && !result, 'contract-card__market-closed--disabled': is_market_closed && should_hide_closed_overlay, })} ref={hover_ref} diff --git a/packages/trader/src/App/Components/Elements/PositionsDrawer/positions-modal-card.jsx b/packages/trader/src/App/Components/Elements/PositionsDrawer/positions-modal-card.jsx index 0acf246631b4..d67b14574ca0 100644 --- a/packages/trader/src/App/Components/Elements/PositionsDrawer/positions-modal-card.jsx +++ b/packages/trader/src/App/Components/Elements/PositionsDrawer/positions-modal-card.jsx @@ -221,8 +221,8 @@ const PositionsModalCard = observer( 0 && !result, - 'dc-contract-card--red': !is_multiplier && profit_loss < 0 && !result, + 'dc-contract-card--green': profit_loss > 0 && !result, + 'dc-contract-card--red': profit_loss < 0 && !result, })} to={{ pathname: `/contract/${contract_info.contract_id}`,