Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hamza/chore: cTrader- Show icons to download cTrader mobile apps(Android) #10518

Merged
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,6 @@
&-description {
display: flex;
justify-content: center;
margin-top: 1.4rem;
}

&-app {
Expand Down
73 changes: 25 additions & 48 deletions packages/cfd/src/Containers/trade-modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const PlatformIconsAndDescriptions = (
components={[
<span
key={0}
className={platform === CFD_PLATFORMS.CTRADER ? 'cfd-trade-modal--tag' : ''}
className={platform === CFD_PLATFORMS.CTRADER && is_demo ? 'cfd-trade-modal--tag' : ''}
/>,
]}
/>
Expand Down Expand Up @@ -186,8 +186,8 @@ const TradeModal = ({
)}
</div>
<div className='cfd-trade-modal__login-specs'>
{platform !== 'dxtrade' && <CTraderAndDerivEZDescription />}
{platform === 'dxtrade' && (
{platform !== CFD_PLATFORMS.DXTRADE && <CTraderAndDerivEZDescription />}
{platform === CFD_PLATFORMS.DXTRADE && (
<React.Fragment>
<div className='cfd-trade-modal__login-specs-item'>
<Text className='cfd-trade-modal--paragraph'>{localize('Username')}</Text>
Expand Down Expand Up @@ -266,57 +266,34 @@ const TradeModal = ({
</a>
</div>
)}
<div className='cfd-trade-modal__download-center-app-ctrader-container'>
<Text
className='cfd-trade-modal__download-center-app-ctrader__banner-text'
align='center'
size='xs'
weight='bold'
>
<Localize i18n_default_text='Coming soon on mobile' />
</Text>
<Text
className='cfd-trade-modal__download-center-app-ctrader__banner-text'
align='center'
size='xxs'
>
<Localize i18n_default_text='cTrader is only available on desktop for now.' />
</Text>
</div>
</React.Fragment>
)}
{platform !== CFD_PLATFORMS.CTRADER && (
<React.Fragment>
<div className='cfd-trade-modal__download-center-description'>{downloadCenterDescription()}</div>
<div className='cfd-trade-modal__download-center-description'>{downloadCenterDescription()}</div>

<div className='cfd-trade-modal__download-center-options'>
<div className='cfd-trade-modal__download-center-options--mobile-links'>
<div className='cfd-trade-modal__download-center-options--mobile-links--apple'>
<a href={mobileDownloadLink(platform, 'ios')} target='_blank' rel='noopener noreferrer'>
<Icon icon='IcInstallationApple' width={isMobile() ? '160' : '130'} height={40} />
</a>
</div>
<a href={mobileDownloadLink(platform, 'android')} target='_blank' rel='noopener noreferrer'>
<Icon icon='IcInstallationGoogle' width={135} height={40} />
<div className='cfd-trade-modal__download-center-options'>
<div className='cfd-trade-modal__download-center-options--mobile-links'>
{platform !== CFD_PLATFORMS.CTRADER && (
<div className='cfd-trade-modal__download-center-options--mobile-links--apple'>
<a href={mobileDownloadLink(platform, 'ios')} target='_blank' rel='noopener noreferrer'>
<Icon icon='IcInstallationApple' width={isMobile() ? '160' : '130'} height={40} />
</a>
{platform !== CFD_PLATFORMS.CTRADER && (
<a
href={mobileDownloadLink(platform, 'huawei')}
target='_blank'
rel='noopener noreferrer'
>
<Icon icon='IcInstallationHuawei' width={135} height={40} />
</a>
)}
</div>
{!isMobile() && (
<div className='cfd-trade-modal__download-center-options--qrcode'>
{getPlatformQRCode(platform)}
</div>
)}
)}
<a href={mobileDownloadLink(platform, 'android')} target='_blank' rel='noopener noreferrer'>
<Icon icon='IcInstallationGoogle' width={135} height={40} />
</a>
{platform !== CFD_PLATFORMS.CTRADER && (
<a href={mobileDownloadLink(platform, 'huawei')} target='_blank' rel='noopener noreferrer'>
<Icon icon='IcInstallationHuawei' width={135} height={40} />
</a>
)}
</div>
{!isMobile() && (
<div className='cfd-trade-modal__download-center-options--qrcode'>
{getPlatformQRCode(platform)}
</div>
</React.Fragment>
)}
)}
</div>
</div>
);
};
Expand Down
6 changes: 3 additions & 3 deletions packages/cfd/src/Helpers/config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const getPlatformQRCode = (acc_type: TCFDsPlatformType) => {
case 'dxtrade':
return 'https://onelink.to/grmtyx';
case 'ctrader':
return 'https://onelink.to/yvk2a5';
return 'https://onelink.to/hyqpv7';
default:
return 'https://onelink.to/grmtyx';
}
Expand All @@ -54,8 +54,8 @@ export const getPlatformQRCode = (acc_type: TCFDsPlatformType) => {
/>
<Text align='center' size='xxs'>
<Localize
i18n_default_text='Scan the QR code to download {{Deriv}} {{ platform }}.'
values={{ platform: platformsText(acc_type), Deriv: acc_type !== 'ctrader' ? 'Deriv' : '' }}
i18n_default_text='Scan the QR code to download Deriv {{ platform }}.'
values={{ platform: platformsText(acc_type) }}
/>
</Text>
</React.Fragment>
Expand Down
2 changes: 1 addition & 1 deletion packages/cfd/src/Helpers/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const DXTRADE_ANDROID_APP_URL = 'https://play.google.com/store/apps/details?id=c
const DXTRADE_HUAWEI_APP_URL = 'https://appgallery.huawei.com/app/C104633219';

const CTRADER_IOS_APP_URL = 'https://apps.apple.com/cy/app/ctrader/id767428811';
const CTRADER_ANDROID_APP_URL = 'https://play.google.com/store/apps/details?id=com.spotware.ct&hl=en&gl=US';
const CTRADER_ANDROID_APP_URL = 'https://play.google.com/store/apps/details?id=com.deriv.ct';

const getBrokerName = () => 'Deriv Holdings (Guernsey) Limited';

Expand Down
Loading