Skip to content
This repository has been archived by the owner on Sep 12, 2024. It is now read-only.

chore: 🔥 updated URL for dtrader in the app switcher #460

Merged
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
14 changes: 3 additions & 11 deletions src/components/Header/platform-dropdown.jsx
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -28,15 +28,7 @@ const PlatformDropdown = React.forwardRef(({ hideDropdown, setIsPlatformSwitcher
return (
<div id='platform__dropdown' className='platform__dropdown show'>
<div id='platform__list' className='platform__dropdown-list' ref={platformDropdownRef}>
{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.${
Expand All @@ -62,7 +54,7 @@ const PlatformDropdown = React.forwardRef(({ hideDropdown, setIsPlatformSwitcher
);
})}
</div>
<a href={config.tradershub.url}>
<a href={CONFIG.tradershub.url}>
<span>{translate('Looking for CFDs? Go to Trader\'s Hub')}</span>
</a>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
},
{
Expand Down
Loading