From f1cd029944d846c92e1bdc70de99cb7e45f3a518 Mon Sep 17 00:00:00 2001 From: Agrim Jain Date: Mon, 24 Jun 2024 12:31:59 +0400 Subject: [PATCH] chore: fix language redirection issue --- themes/gatsby-theme-deriv/src/common/constants.ts | 2 +- .../gatsby-theme-deriv/src/components/custom/_dhero.tsx | 3 ++- .../src/pages/dtrader/_steps_section.tsx | 9 +++++---- 3 files changed, 8 insertions(+), 6 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 2065ef1955b..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 @@ -205,7 +206,7 @@ const DHero = ({ join_us_for_free, is_live_demo, image_name }: DHeroProps) => { 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..bae7763a674 100644 --- a/themes/gatsby-theme-deriv/src/pages/dtrader/_steps_section.tsx +++ b/themes/gatsby-theme-deriv/src/pages/dtrader/_steps_section.tsx @@ -126,10 +126,11 @@ const DtraderEasySteps = () => { renderFooter={() => (