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

Commit

Permalink
Agrim/DPROD-4165/dtrader traders hub url (#7769)
Browse files Browse the repository at this point in the history
* fix: dtrader traders hub url

* fix: dtrader traders hub

* fix: dtrader

* fix: dtrader url

* fix: dtrader issue

* fix: deriv x web browser to traders hub

---------

Co-authored-by: Agrim Jain <[email protected]>
  • Loading branch information
agrim-deriv and Agrim Jain authored Jun 4, 2024
1 parent 1b700ff commit 1118764
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 11 deletions.
5 changes: 3 additions & 2 deletions themes/gatsby-theme-deriv/src/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ export const deriv_life_url = `https://derivlife.com/`
export const academy_url = `https://academy.deriv.com/`
export const derivx_app_url = `${deriv_app_url}/derivx`
export const smarttrader_url = `https://smarttrader.${getDomainUrl()}`
export const traders_hub = 'https://app.deriv.com/appstore/traders-hub'
export const traders_hub = 'https://app.deriv.com/'
export const dtrader_url = 'https://app.deriv.com/dtrader'
export const binary_bot_url = `https://bot.${getDomainUrl()}`
export const blog_url = `https://blog.${deriv_com_url}`
export const deriv_cookie_domain = getDomainUrl()
Expand Down Expand Up @@ -133,7 +134,7 @@ export const ctrader_ios_url =
export const how_to_trade_accumulator_video_id = '917007011'
export const what_are_accumulator_video_id = '915479906'
export const ctrader_web_browser_url = 'ct.deriv.com'
export const ctrader_traders_hub_url = ' https://app.deriv.com/appstore/traders-hub'
export const ctrader_traders_hub_url = ' https://app.deriv.com/'
export const ctrader_windows_url = 'https://getctrader.com/deriv/ctrader-deriv-setup.exe'
export const ctrader_apple_store_url = ' https://apps.apple.com/us/app/deriv-ctrader/id6466996509'
export const ctrader_mac_os_url = 'https://getctradermac.com/deriv/ctrader-deriv-setup.dmg'
Expand Down
4 changes: 2 additions & 2 deletions themes/gatsby-theme-deriv/src/common/utility.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export const getDerivAppLocalizedURL = (link: string, locale: string, to = '') =

export const TradersHubURL: ProductLinkGenerator = ({ locale }) => {
const lang = deriv_app_languages.includes(locale) ? locale : 'en'
return `https://app.deriv.com/appstore/traders-hub?lang=${lang.toUpperCase()}`
return `https://app.deriv.com/?lang=${lang.toUpperCase()}`
}
export const getSmartTraderLocalizedURL = (link: string, locale: string) => {
const lang = smart_trader_languages.includes(locale) ? locale : 'en'
Expand Down Expand Up @@ -245,7 +245,7 @@ const getLimit = (input: string, limit: number) => {
export const truncateString = (input: string, limit: number) =>
input.length > limit ? `${input.substring(0, getLimit(input, limit))}...` : input
// Function which returns sub path to the specific trading platform
const supported_platforms = ['mt5', 'bot', 'derivx']
const supported_platforms = ['mt5', 'bot', 'derivx', 'dtrader']
export const redirectToTradingPlatform = () =>
supported_platforms.filter(
(platform) => window.location.pathname.includes(platform) && platform,
Expand Down
3 changes: 2 additions & 1 deletion themes/gatsby-theme-deriv/src/components/custom/_dhero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { Container } from 'components/containers'
import { useIsRtl } from 'components/hooks/use-isrtl'
import useBuildVariant from 'features/hooks/use-build-variant'
import { breakpoints } from 'themes/theme.breakpoints'
import { dtrader_url } from 'common/constants'

type DHeroProps = {
is_live_demo?: boolean
Expand Down Expand Up @@ -204,7 +205,7 @@ const DHero = ({ join_us_for_free, is_live_demo, image_name }: DHeroProps) => {
<GoToLiveDemo
tertiary
external
type={getLinkType()}
to={dtrader_url}
target="_blank"
rel="noopener noreferrer nofollow"
>
Expand Down
2 changes: 1 addition & 1 deletion themes/gatsby-theme-deriv/src/components/custom/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const handleGetTrading = () => {

export const handleRedirectToTradersHub = () => {
const trading_hub_url_localized = getDerivAppLocalizedURL(
`${deriv_app_url}/appstore/traders-hub`,
`${deriv_app_url}`,
getLanguage(),
)
const redirect_link = addQueryParam(trading_hub_url_localized, 'redirect_from', 'deriv_com')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const ctrader_manage_data: CtraderManageDataType = {
button_url: {
type: 'non-company',
target: '_blank',
href: 'https://app.deriv.com/appstore/traders-hub',
href: 'https://app.deriv.com/',
},
image_url: <Image src={AddAccountImage} width={325} alt={'_t_Add account image_t_'} />,
image_url_mobile: (
Expand Down Expand Up @@ -77,7 +77,7 @@ export const ctrader_manage_data: CtraderManageDataType = {
button_url: {
type: 'non-company',
target: '_blank',
href: 'https://app.deriv.com/appstore/traders-hub',
href: 'https://app.deriv.com/',
},
button_text: "_t_Go to Trader's Hub_t_",
},
Expand Down
3 changes: 2 additions & 1 deletion themes/gatsby-theme-deriv/src/pages/derivx/_get-derivx.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
derivx_huawei_url,
derivx_ios_url,
derivx_app_url,
traders_hub,
} from 'common/constants'
import DownloadColumn, { TDownloadColumnItem } from 'components/custom/_multi-width-column-download'
import { localize } from 'components/localization'
Expand Down Expand Up @@ -85,7 +86,7 @@ const DerivXGetApp = () => {
{
text: 'Web Browser',
icon: BrowserIcon,
link: derivx_app_url,
link: traders_hub,
smallText: '_t_Use it on your_t_',
visibility: deriv_x_apps_web_browser,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ const provider: TContent = {
<br key={1} />,
<LocalizedLinkText
external
to="https://app.deriv.com/appstore/traders-hub"
to="https://app.deriv.com/"
color="red"
target="_blank"
rel="noopener noreferrer"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { LinkButton } from 'components/form'
import useBreakpoints from 'components/hooks/use-breakpoints'
import { QueryImage } from 'components/elements'
import useBuildVariant from 'features/hooks/use-build-variant'
import { dtrader_url } from 'common/constants'

const query = graphql`
query {
Expand Down Expand Up @@ -127,7 +128,7 @@ const DtraderEasySteps = () => {
<GoToLiveDemo
secondary
external
type="deriv_app"
to={dtrader_url}
target="_blank"
rel="noopener noreferrer nofollow"
>
Expand Down

0 comments on commit 1118764

Please sign in to comment.