Skip to content

Commit

Permalink
fix: compare accounts header
Browse files Browse the repository at this point in the history
  • Loading branch information
hasan-deriv committed Dec 12, 2024
1 parent ffe0db2 commit 9e429d9
Showing 1 changed file with 7 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import {
dxtrade_data,
ctrader_data,
} from '../../Helpers/compare-accounts-config';
import { REGION } from '../../Helpers/cfd-config';

const CompareCFDs = observer(() => {
const { isDesktop } = useDevice();
Expand All @@ -26,8 +25,7 @@ const CompareCFDs = observer(() => {
const store = useStore();
const { client, traders_hub } = store;
const { trading_platform_available_accounts } = client;
const { is_demo, is_eu_user, available_dxtrade_accounts, selected_region, available_ctrader_accounts } =
traders_hub;
const { is_demo, is_eu_user, available_dxtrade_accounts, available_ctrader_accounts } = traders_hub;

const sorted_available_accounts = !is_eu_user
? getSortedCFDAvailableAccounts(trading_platform_available_accounts)
Expand Down Expand Up @@ -64,20 +62,12 @@ const CompareCFDs = observer(() => {
? all_cfd_available_accounts.length + 1
: all_cfd_available_accounts.length;

const getCompareAccountsHeader = () =>
selected_region === REGION.EU ? (
<Localize
i18n_default_text='Deriv MT5 CFDs {{title}} account'
values={{
title: is_demo ? localize('demo') : localize('real'),
}}
/>
) : (
<Localize
i18n_default_text='Compare CFDs {{title}} accounts'
values={{ title: is_demo ? localize('demo') : '' }}
/>
);
const getCompareAccountsHeader = () => (
<Localize
i18n_default_text='Compare CFDs {{title}} accounts'
values={{ title: is_demo ? localize('demo') : '' }}
/>
);

const DesktopHeader = (
<div className='compare-cfd-header'>
Expand Down

0 comments on commit 9e429d9

Please sign in to comment.