Skip to content
This repository was archived by the owner on Feb 22, 2024. It is now read-only.

Mitra/Redirect row client to deriv #3835

Draft
wants to merge 17 commits into
base: binary-to-deriv
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all 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
2 changes: 0 additions & 2 deletions src/common/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import es from './translations/es_ES/i10n.json';
import fr from './translations/fr_FR/i10n.json';
import en from './translations/en/i10n.json';
import ach from './translations/ach_UG/i10n.json';
import id from './translations/id_ID/i10n.json';

export const supportedLanguages = {
zh_tw: zhTw,
Expand All @@ -25,7 +24,6 @@ export const supportedLanguages = {
fr,
en,
ach,
id,
};

const fallbackLang = en;
Expand Down
193 changes: 106 additions & 87 deletions src/common/translations/ach_UG/i10n.json

Large diffs are not rendered by default.

1,117 changes: 568 additions & 549 deletions src/common/translations/ar_SA/i10n.json

Large diffs are not rendered by default.

193 changes: 106 additions & 87 deletions src/common/translations/en/i10n.json

Large diffs are not rendered by default.

195 changes: 107 additions & 88 deletions src/common/translations/es_ES/i10n.json

Large diffs are not rendered by default.

193 changes: 106 additions & 87 deletions src/common/translations/fr_FR/i10n.json

Large diffs are not rendered by default.

551 changes: 0 additions & 551 deletions src/common/translations/id_ID/i10n.json

This file was deleted.

195 changes: 107 additions & 88 deletions src/common/translations/it_IT/i10n.json

Large diffs are not rendered by default.

193 changes: 106 additions & 87 deletions src/common/translations/pl_PL/i10n.json

Large diffs are not rendered by default.

199 changes: 109 additions & 90 deletions src/common/translations/pt_PT/i10n.json

Large diffs are not rendered by default.

195 changes: 107 additions & 88 deletions src/common/translations/ru_RU/i10n.json

Large diffs are not rendered by default.

201 changes: 110 additions & 91 deletions src/common/translations/th_TH/i10n.json

Large diffs are not rendered by default.

193 changes: 106 additions & 87 deletions src/common/translations/vi_VN/i10n.json

Large diffs are not rendered by default.

193 changes: 106 additions & 87 deletions src/common/translations/zh_CN/i10n.json

Large diffs are not rendered by default.

193 changes: 106 additions & 87 deletions src/common/translations/zh_TW/i10n.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const ChooseSection = () => (
</div>
<div className='binary-choose-wrapper-inner-description'>
<h1>{translate('3 trade types')}</h1>
<h2>{translate('Trade CFDs, digital options, and multipliers, a new exciting trade type that boosts your potential profits with limited risk.')}</h2>
<h2>{translate('Trade CFDs, digital options, and multipliers a new exciting trade type that boosts your potential profits with limited risk.')}</h2>
</div>
</div>
<div className='binary-choose-wrapper-inner-right-content'>
Expand All @@ -32,7 +32,7 @@ const ChooseSection = () => (
</div>
<div className='binary-choose-wrapper-inner-description'>
<h1 className='mb0'>{translate('Crypto deposits via fiat on-ramp')}</h1>
<h2>{translate('Make crypto deposits easily via exchange services such as Changelly, Banxa, and XanPool.')}</h2>
<h2>{translate('Make crypto deposits easily via exchange services such as Banxa.')}</h2>
</div>
</div>
</div>
Expand All @@ -43,7 +43,7 @@ const ChooseSection = () => (
</div>
<div className='binary-choose-wrapper-inner-description'>
<h1>{translate('Over 100+ instruments')}</h1>
<h2>{translate('Trade what you like — forex, commodities, stocks, stock indices, and synthetic indices. ')}</h2>
<h2>{translate('Trade what you like — forex, commodities, stocks, stock indices, and derived indices.')}</h2>
</div>
</div>
<div className='binary-choose-wrapper-inner-left-content'>
Expand All @@ -61,7 +61,7 @@ const ChooseSection = () => (
</div>
<div className='binary-choose-wrapper-inner-description'>
<h1>{translate('Support when you need it')}</h1>
<h2>{translate('Get round-the-clock customer support and access to the Help Centre.')}</h2>
<h2>{translate('Get round-the-clock customer support and access to the Help centre.')}</h2>
</div>
</div>
</div>
Expand Down
25 changes: 18 additions & 7 deletions src/indexPage/react-components/binary-landing/Footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,31 +12,42 @@ const Footer = () => (
<img src='image/derivLogo.png' />
</div>
<div className='about-trade-wrapper-social-icons'>
<a href="https://www.youtube.com/@deriv" target="_blank"><img src='image/youtube.svg' /></a>
<a href="https://www.reddit.com/user/Deriv_official/" target="_blank"><img src='image/reddit.svg' /></a>
<a href="https://t.me/derivdotcomofficial" target="_blank"><img src='image/telegram.svg' /></a>
<a href="https://www.facebook.com/derivdotcom" target="_blank"><img src='image/facebook.svg' /></a>
<a href="https://twitter.com/derivdotcom/" target="_blank"><img src='image/twitter.svg' /></a>
<a href="https://www.instagram.com/deriv_official/" target="_blank"><img src='image/instagram.svg' /></a>
<a href="https://www.linkedin.com/company/derivdotcom/" target="_blank"><img src='image/linkedin.svg' /></a>


</div>
</div>
<div className='about-trade-wrapper-inner-social-icons-mobile'>
<a href="https://www.youtube.com/@deriv" target="_blank"><img src='image/youtube.svg' /></a>
<a href="https://www.reddit.com/user/Deriv_official/" target="_blank"><img src='image/reddit.svg' /></a>
<a href="https://t.me/derivdotcomofficial" target="_blank"><img src='image/telegram.svg' /></a>
<a href="https://www.facebook.com/derivdotcom" target="_blank"><img src='image/facebook.svg' /></a>
<a href="https://twitter.com/derivdotcom/" target="_blank"><img src='image/twitter.svg' /></a>
<a href="https://www.instagram.com/deriv_official/" target="_blank"><img src='image/instagram.svg' /></a>
<a href="https://www.linkedin.com/company/derivdotcom/" target="_blank"><img src='image/linkedin.svg' /></a>
</div>
<div className='about-trade-wrapper-inner-info'>
<div className='about-trade-wrapper-inner-info-location'>
<p>{translate('In the EU, financial products are offered by Deriv Investments (Europe) Limited, W Business Centre, Level 3, Triq Dun Karm, Birkirkara BKR 9033, Malta, licensed in Malta ')}<b><a href="https://deriv.com/regulatory/Deriv_Investments_(Europe)_Limited.pdf" target="_blank">{translate('(licence no. IS/70156)')}</a></b> {translate('and regulated by the Malta Financial Services Authority, Triq l-Imdina, Zone 1, Central Business District, Birkirkara CBD 1010, Malta, under the Investments Services Act. Authorised by the Financial Conduct Authority and with deemed variation of permission. Subject to regulation by the Financial Conduct Authority. The nature and extent of consumer protections may differ from those for firms based in the UK. Details of the Financial Services Contracts Regime, which allows EEA-based firms to operate in the UK for a limited period to carry on activities that are necessary for the performance of pre-existing contracts, are available on the Financial Conduct Authority’s website.')}</p>
<p>{translate('Outside the EU, financial products are offered by the following companies: Deriv (FX) Ltd, F16, Level 1, Paragon Labuan, Jalan Tun Mustapha, 87000 Labuan, Malaysia, licensed by Labuan Financial Services Authority ')}<b><a href='https://deriv.com/regulatory/Deriv_(FX)_Ltd.pdf' target="_blank">{translate('(licence no. MB/18/0024);')}</a></b> {translate('Deriv (BVI) Ltd, Kingston Chambers, P.O. Box 173, Road Town, Tortola, British Virgin Islands, licensed by the British Virgin Islands Financial Services Commission ')}<a href="https://deriv.com/regulatory/Deriv_(BVI)_Ltd.pdf" target="_blank"><b>{translate('(licence no.SIBA/L/18/1114);')}</b></a>{translate(' Deriv (V) Ltd, 1276, Kumul Highway, Port Vila, Vanuatu, licensed and regulated by the Vanuatu Financial Services Commission; and Deriv (SVG) LLC, Hinds Buildings, Kingstown, St. Vincent and the Grenadines.')}</p>
<p>{translate('Deriv Limited — 13 Castle Street, St. Helier, JE2 3BT, Jersey — is the holding company for the above subsidiaries.')}</p>
<p>{translate('This website\'s services are not available in certain countries, including the USA, Canada, and Hong Kong, or to persons below 18.')}</p>
<p>{translate('Deriv Investments (Europe) Limited is licensed and regulated by the Malta Financial Services Authority, Triq L-Imdina, Zone 1, Central Business District, Birkirkara CBD 1010, Malta, under the Investment Services Act ')}<b><a href='https://deriv.com/regulatory/Deriv_Investments_(Europe)_Limited.pdf' target="_blank">{translate('(licence)')}</a></b>{translate('. The registered office of Deriv Investments (Europe) Limited is at W Business Centre, Level 3, Triq Dun Karm, Birkirkara BKR9033, Malta.')}</p>
<p>{translate('Deriv (FX) Ltd is licensed by Labuan Financial Services Authority ')}<b><a href='https://deriv.com/regulatory/Deriv_(FX)_Ltd.pdf' target="_blank">{translate('(licence)')}</a></b>{translate('. The registered office of Deriv (FX) Ltd is at F16, Level 1, Paragon Labuan, Jalan Tun Mustapha, 87000 Labuan, Malaysia.')}</p>
<p>{translate('Deriv (BVI) Ltd is licensed by the British Virgin Islands Financial Services Commission ')}<b><a href='https://deriv.com/regulatory/Deriv_(BVI)_Ltd.pdf' target="_blank">{translate('(licence)')}</a></b>{translate('. The registered office of Deriv (BVI) is at Kingston Chambers, P.O. Box 173, Road Town, Tortola, British Virgin Islands.')}</p>
<p>{translate('Deriv (V) Ltd is licensed and regulated by the Vanuatu Financial Services Commission ')}<b><a href='https://deriv.com/regulatory/Deriv_(V)_Ltd.pdf' target="_blank">{translate('(licence)')}</a></b>{translate('. The registered office of Deriv (V) Ltd is at 1276 Kumul Highway, Port Vila, Vanuatu.')}</p>
<p>{translate('Deriv (SVG) LLC has a registered office at Hinds Buildings, Kingstown, St. Vincent and the Grenadines.')}</p>
<p>{translate('Deriv Holdings (Guernsey) Limited — 2nd Floor, 1 Cornet Street, St Peter Port, Guernsey, GY1 1BZ — is the holding company for the above subsidiaries.')}</p>

</div>
<div className='about-trade-wrapper-inner-info-trade'>
<p>{translate('CFDs are considered complex derivatives and may not be suitable for retail clients. CFDs are complex instruments and come with a high risk of losing money rapidly due to leverage. You should consider whether you understand how CFDs work and whether you can afford to take the high risk of losing your money. The products mentioned here may be affected by changes in currency exchange rates. If you invest in these products, you may lose some or all of your investment, and the value of your investment may fluctuate. You should never invest money that you cannot afford to lose and never trade with borrowed money.')}</p>
<p>{translate('Before trading in the complex financial products offered, please be sure to understand the risks involved and learn about ')}<a href="https://deriv.com/responsible/" target="_blank"><b>{translate('Secure and responsible trading.')}</b></a></p>
<p>{translate('Please remember that CFDs and other products offered on this website are complex derivatives and may not be suitable for all clients. Trading in these products carries a substantial risk of losing money rapidly.')}</p>
<p>{translate('Make sure to read our ')}<b><a href='https://deriv.com/terms-and-conditions/' target="_blank">{translate('Terms and conditions')}</a></b>{translate(', ')} <b><a href='https://deriv.com/tnc/risk-disclosure.pdf' target="_blank">{translate('Risk disclosure')}</a></b>{translate(', and')} <b><a href='https://deriv.com/responsible/' target="_blank">{translate('Secure and responsible trading')}</a></b>{translate(' to fully understand the risks involved before using our services. Please also note that the information on this website does not constitute investment advice.')}</p>
</div>
</div>

</div>
</section >
)
Expand Down
35 changes: 16 additions & 19 deletions src/indexPage/react-components/binary-landing/Hero.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,44 +12,44 @@ const carouselImages = [
];

const carouselSettings = {
dots : false,
infinite : true,
speed : 1000,
slidesToShow : 1,
dots: false,
infinite: true,
speed: 1000,
slidesToShow: 1,
slidesToScroll: 1,
arrows : false,
autoplay : true,
autoplaySpeed : 3000,
responsive : [
arrows: false,
autoplay: true,
autoplaySpeed: 3000,
responsive: [
{
breakpoint: 1024,
settings : {
slidesToShow : 1,
settings: {
slidesToShow: 1,
slidesToScroll: 1,
},
},
{
breakpoint: 700,
settings : {
slidesToShow : 1,
settings: {
slidesToShow: 1,
slidesToScroll: 1,
},
},
],
};

const Hero = ({isFromBinary}) => {
const Hero = ({ isFromBinary }) => {
const renderFromBinaryContent = () => (
<div className="hero-wrapper-container_box-binary hero-wrapper-container-left-binary">
<h1>{translate('We have a new home: Deriv.')}</h1>
<h2>
{translate('We’ve rebranded the online trading space by offering new innovative products, intuitive platforms, and outstanding services.')}
</h2>
<div className="btn-group-binary">
<button className="l-btn-binary primary" onClick={() => window.open(getLanguageBase('deriv'),'_self')}>
<button className="l-btn-binary primary" onClick={() => window.open(getLanguageBase('deriv'), '_self')}>
{translate('Explore Deriv')}
</button>
<button className="l-btn-binary" onClick={() => window.open(getLanguageBase('signup'),'_self')}>
<button className="l-btn-binary" onClick={() => window.open(getLanguageBase('signup'), '_self')}>
{translate('Create a demo account')}

</button>
Expand All @@ -70,12 +70,9 @@ const Hero = ({isFromBinary}) => {
<b>{translate(' Deriv.')}</b>
</h2>
<div className="btn-group-binary">
<button className="l-btn-binary primary" onClick={() => window.open(getLanguageBase('deriv'),'_self')}>
<button className="l-btn-binary primary" onClick={() => window.open(getLanguageBase('deriv'), '_self')}>
{translate('Hello Deriv!')}
</button>
<button className="l-btn-binary" onClick={() => setBinaryCookieAndRedirect(getLanguageBase('binary'))}>
{translate('Maybe later')}
</button>
</div>
</div>
);
Expand Down
18 changes: 7 additions & 11 deletions src/indexPage/react-components/binary-landing/LanguageSelector.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ const languages = [
code: 'es',
name: 'Español',
},
{
code: 'id',
name: 'Indonesia',
},
{
code: 'pt',
name: 'Português',
Expand All @@ -24,11 +20,11 @@ const LanguageSelector = () => {
const [isOpen, setIsOpen] = React.useState(false);
const currentLanguage = getLanguage();
const selectedLanguage = languages.find((language) => language.code === currentLanguage) || languages[0]


React.useEffect(() => {
const onClickOutside = (e) => {
if( $(e.target).closest('.language-selector').length > 0 ) {
if ($(e.target).closest('.language-selector').length > 0) {
return false;
}

Expand All @@ -38,9 +34,9 @@ const LanguageSelector = () => {
document.documentElement.addEventListener('click', onClickOutside);

return () => document.documentElement.removeEventListener('click', onClickOutside);
},[]);
}, []);

const LanguageItem = ({language}) => {
const LanguageItem = ({ language }) => {
const onLanguageSelect = () => {
setIsOpen(false);
changeLanguage(language.code)
Expand All @@ -56,15 +52,15 @@ const LanguageSelector = () => {
</div>
);
}

return (
<div className='language-selector' onClick={() => setIsOpen(old => !old)}>
<div className='language-selector-button'>
<p className='language-selector-button-name'>{selectedLanguage.code.toUpperCase()}</p>
<div className={`language-selector-button-arrow ${isOpen ? 'up' : 'down'}`} />
</div>
<div className={`language-selector-container ${isOpen ? 'open' : 'close'}`}>
{languages.map(language => <LanguageItem language={language}/>) }
{languages.map(language => <LanguageItem language={language} />)}
</div>
</div>
);
Expand Down
13 changes: 1 addition & 12 deletions src/indexPage/react-components/binary-landing/SwitchSection.jsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import React from 'react';
import { translate } from '../../../common/i18n';
import { getLanguageBase } from '../../../common/lang';
import { setBinaryCookieAndRedirect } from './utils';

const SwitchSection = ({ isFromBinary }) => (
const SwitchSection = () => (
<section className="switch">
<div className="switch-inner section-container">
<div className="switch-inner__placeholder">
Expand All @@ -23,16 +22,6 @@ const SwitchSection = ({ isFromBinary }) => (
>
{translate('Try it now')}
</button>
{!isFromBinary && (
<button
className="l-btn-binary transparent"
onClick={() =>
setBinaryCookieAndRedirect(getLanguageBase('binary'))
}
>
{translate('Maybe later')}
</button>
)}
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/indexPage/react-components/binary-landing/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ import Cookies from 'js-cookie';

// eslint-disable-next-line import/prefer-default-export
export const setBinaryCookieAndRedirect = url => {
Cookies.set('row-lp-visited', true, { expires: 7 });
Cookies.set('row-lp-visited', true, { expires: 1 / 24 });
window.open(url, '_self');
};
Loading