Skip to content

Commit

Permalink
Merge pull request #11 from eduard-deriv/eduard/WFLOW-1372/langs-redi…
Browse files Browse the repository at this point in the history
…recton-to-en-academy-page

added academy-signup page redirection
  • Loading branch information
habib-deriv authored Jul 25, 2024
2 parents 2565856 + 6189f64 commit b9ed0b2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions themes/gatsby-theme-deriv/gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ const BuildPage = (page, actions, region) => {
const who_we_are = /who-we-are/g.test(page.path)
const is_cfds = /cfds/g.test(page.path)
const is_options = /options/g.test(page.path)
const is_academy_signup = /academy-signup/g.test(page.path);

if (is_careers) {
createRedirect({
Expand Down Expand Up @@ -372,6 +373,15 @@ const BuildPage = (page, actions, region) => {
})
}

if (is_academy_signup) {
createRedirect({
fromPath: `/${lang}/academy-signup/`,
toPath: `/academy-signup/`,
redirectInBrowser: true,
isPermanent: true,
});
lang = 'EN';

Check failure on line 383 in themes/gatsby-theme-deriv/gatsby-node.js

View workflow job for this annotation

GitHub Actions / release-production

Assignment to function parameter 'lang'

Check failure on line 383 in themes/gatsby-theme-deriv/gatsby-node.js

View workflow job for this annotation

GitHub Actions / release-production

Assignment to function parameter 'lang'
}
return current_page
})
}
Expand Down

0 comments on commit b9ed0b2

Please sign in to comment.