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

Commit

Permalink
Merge pull request #460 from sandeep-deriv/sandeep/bot-1759/update-tr…
Browse files Browse the repository at this point in the history
…ader-hub-url

chore: 🔥 updated URL for dtrader in the app switcher
  • Loading branch information
sandeep-deriv authored May 28, 2024
2 parents 40847ef + 429b4f2 commit ca8668a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
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

0 comments on commit ca8668a

Please sign in to comment.