Skip to content

Commit

Permalink
fix: style fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nada-deriv committed Jun 12, 2023
1 parent c1e68b8 commit d2f46d3
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions packages/p2p/src/components/my-ads/my-ads-row-renderer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ const MyAdsRowRenderer = observer(({ row: advert }) => {
market_rate: effective_rate,
});

const ad_pause_color = general_store.is_listed && !general_store.is_barred ? 'general' : 'less-prominent';
const advert_active_color =
general_store.is_listed && !general_store.is_barred ? 'profit-success' : 'less-prominent';
const is_advert_listed = general_store.is_listed && !general_store.is_barred;
const ad_pause_color = is_advert_listed ? 'general' : 'less-prominent';

const icon_disabled_color =
(!general_store.is_listed || general_store.is_barred || !is_advert_active) && 'disabled';
const is_activate_ad_disabled = floating_rate_store.reached_target_date && enable_action_point;
Expand All @@ -63,7 +63,7 @@ const MyAdsRowRenderer = observer(({ row: advert }) => {
}
};
const onClickAdd = () => {
if (general_store.is_listed && !general_store.is_barred) {
if (is_advert_listed) {
my_ads_store.showQuickAddModal(advert);
}
};
Expand Down Expand Up @@ -146,7 +146,11 @@ const MyAdsRowRenderer = observer(({ row: advert }) => {
)}
</div>
<div className='p2p-my-ads__table-row-details'>
<Text color={advert_active_color} line_height='m' size='xxs'>
<Text
color={is_advert_listed ? 'profit-success' : 'less-prominent'}
line_height='m'
size='xxs'
>
{`${formatMoney(account_currency, amount_dealt, true)}`} {account_currency}&nbsp;
{is_buy_advert ? localize('Bought') : localize('Sold')}
</Text>
Expand Down Expand Up @@ -175,9 +179,7 @@ const MyAdsRowRenderer = observer(({ row: advert }) => {
{min_order_amount_display} - {max_order_amount_display} {account_currency}
</Text>
<Text
color={
general_store.is_listed && !general_store.is_barred ? 'profit-success' : 'disabled'
}
color={is_advert_listed ? 'profit-success' : 'disabled'}
line_height='m'
size='xs'
weight='bold'
Expand Down

0 comments on commit d2f46d3

Please sign in to comment.