From 429b4f23e12221eaf84b003b9fd63d8a5ce48a77 Mon Sep 17 00:00:00 2001 From: Sandeep Date: Tue, 28 May 2024 16:47:58 +0800 Subject: [PATCH] chore: :fire: updated URL for dtrader in the app switcher --- src/components/Header/platform-dropdown.jsx | 14 +++----------- src/config.js | 4 ++-- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/src/components/Header/platform-dropdown.jsx b/src/components/Header/platform-dropdown.jsx index 6cd507e43..f16e4644e 100644 --- a/src/components/Header/platform-dropdown.jsx +++ b/src/components/Header/platform-dropdown.jsx @@ -1,7 +1,7 @@ import React from 'react'; import classNames from 'classnames'; import PropTypes from 'prop-types'; -import config from '@config'; +import CONFIG from '@config'; import { getLang } from '@storage'; import { getRelatedDerivOrigin } from '@utils'; import { useLocation } from 'react-router-dom'; @@ -28,15 +28,7 @@ const PlatformDropdown = React.forwardRef(({ hideDropdown, setIsPlatformSwitcher return (
- {config.platforms.map(platform => { - if (platform.title === 'DTrader') { - const related_deriv_origin = getRelatedDerivOrigin(); - platform.link = `${related_deriv_origin.origin}/?lang=${lang || 'en'}`; - } - if (platform.title === 'DBot') { - const related_deriv_origin = getRelatedDerivOrigin(); - platform.link = `${related_deriv_origin.origin}/bot/?lang=${lang || 'en'}`; - } + {CONFIG.platforms.map(platform => { if (platform.title === 'SmartTrader') { const related_deriv_origin = getRelatedDerivOrigin(); platform.link = `https://${related_deriv_origin.prefix}smarttrader.deriv.${ @@ -62,7 +54,7 @@ const PlatformDropdown = React.forwardRef(({ hideDropdown, setIsPlatformSwitcher ); })}
- + {translate('Looking for CFDs? Go to Trader\'s Hub')}
diff --git a/src/config.js b/src/config.js index 6aa221db7..4c03169f2 100644 --- a/src/config.js +++ b/src/config.js @@ -132,13 +132,13 @@ const getConfig = () => ({ { title: 'DTrader', description: translate('A whole new trading experience on a powerful yet easy to use platform.'), - link: related_deriv_origin.origin, + link: generateDerivLink('dtrader'), logo: 'public/images/ic-brand-dtrader.svg', }, { title: 'DBot', description: translate('Automated trading at your fingertips. No coding needed.'), - link: `${related_deriv_origin.origin}/bot`, + link: generateDerivLink('bot'), logo: 'public/images/ic-brand-dbot.svg', }, {