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

Commit

Permalink
Agrim/DPROD-4187/Dtrader redirection languages (#7809)
Browse files Browse the repository at this point in the history
* fix: redirection dtrader

* fix: empty commit

* chore: fix language redirection issue

* fix: step section go to live demo fix
  • Loading branch information
agrim-deriv authored Jun 28, 2024
1 parent f77a099 commit 3964cc0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion themes/gatsby-theme-deriv/src/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
6 changes: 4 additions & 2 deletions themes/gatsby-theme-deriv/src/components/custom/_dhero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -204,9 +205,10 @@ const DHero = ({ join_us_for_free, is_live_demo, image_name }: DHeroProps) => {
{is_live_demo && (
<GoToLiveDemo
tertiary
to={dtrader_url}
external
to={`https://app.deriv.com/dtrader?lang=${getLanguage()}`}
target="_blank"
rel="noopener noreferrer nofollow"
rel="noopener noreferrer"
>
<Localize translate_text="_t_Go to live demo_t_" />
</GoToLiveDemo>
Expand Down
10 changes: 6 additions & 4 deletions themes/gatsby-theme-deriv/src/pages/dtrader/_steps_section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -126,10 +127,11 @@ const DtraderEasySteps = () => {
renderFooter={() => (
<GotoLiveWrapper>
<GoToLiveDemo
secondary
to={dtrader_url}
target="_blank"
rel="noopener noreferrer nofollow"
tertiary
external
to={`https://app.deriv.com/dtrader?lang=${getLanguage()}`}
target="_blank"
rel="noopener noreferrer"
>
<Localize translate_text="_t_Go to live demo_t_" />
</GoToLiveDemo>
Expand Down

0 comments on commit 3964cc0

Please sign in to comment.