From 3964cc05e1fd8b48f942d196f723481e858d999c Mon Sep 17 00:00:00 2001 From: Agrim Jain <157685219+agrim-deriv@users.noreply.github.com> Date: Fri, 28 Jun 2024 11:48:29 +0400 Subject: [PATCH] Agrim/DPROD-4187/Dtrader redirection languages (#7809) * fix: redirection dtrader * fix: empty commit * chore: fix language redirection issue * fix: step section go to live demo fix --- themes/gatsby-theme-deriv/src/common/constants.ts | 2 +- .../src/components/custom/_dhero.tsx | 6 ++++-- .../src/pages/dtrader/_steps_section.tsx | 10 ++++++---- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/themes/gatsby-theme-deriv/src/common/constants.ts b/themes/gatsby-theme-deriv/src/common/constants.ts index 73276e1042e..84cbf7d50a4 100644 --- a/themes/gatsby-theme-deriv/src/common/constants.ts +++ b/themes/gatsby-theme-deriv/src/common/constants.ts @@ -60,7 +60,7 @@ 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/' -export const dtrader_url = 'https://app.deriv.com/dtrader' +export const dtrader_url = `https://app.${getDomainUrl()}/dtrader` export const binary_bot_url = `https://bot.${getDomainUrl()}` export const blog_url = `https://blog.${deriv_com_url}` export const deriv_cookie_domain = getDomainUrl() diff --git a/themes/gatsby-theme-deriv/src/components/custom/_dhero.tsx b/themes/gatsby-theme-deriv/src/components/custom/_dhero.tsx index 4cc98cb4278..7f676c418ee 100644 --- a/themes/gatsby-theme-deriv/src/components/custom/_dhero.tsx +++ b/themes/gatsby-theme-deriv/src/components/custom/_dhero.tsx @@ -17,6 +17,7 @@ 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' +import { getLanguage } from 'common/utility' type DHeroProps = { is_live_demo?: boolean @@ -204,9 +205,10 @@ const DHero = ({ join_us_for_free, is_live_demo, image_name }: DHeroProps) => { {is_live_demo && ( diff --git a/themes/gatsby-theme-deriv/src/pages/dtrader/_steps_section.tsx b/themes/gatsby-theme-deriv/src/pages/dtrader/_steps_section.tsx index 58bd622e349..5c634d8b14a 100644 --- a/themes/gatsby-theme-deriv/src/pages/dtrader/_steps_section.tsx +++ b/themes/gatsby-theme-deriv/src/pages/dtrader/_steps_section.tsx @@ -11,6 +11,7 @@ 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' +import { getLanguage } from 'common/utility' const query = graphql` query { @@ -126,10 +127,11 @@ const DtraderEasySteps = () => { renderFooter={() => (