Skip to content

Commit

Permalink
fix: redirection of language to english only
Browse files Browse the repository at this point in the history
  • Loading branch information
aswathy-deriv committed Feb 22, 2024
1 parent 3be632d commit 4e0bd54
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 18 deletions.
2 changes: 2 additions & 0 deletions crowdin/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -3458,6 +3458,8 @@
"-1541554430": "Next",
"-1770179687": "By clicking “Create account”, you confirm that you are 18 or older. You understand that we may use your email address to send you information about Deriv products and services as well as market news. You can always unsubscribe from these emails in your account settings. For more information, please take a look at Deriv’s <0>Security and privacy policy</0>.",
"-417711545": "Create account",
"-1264882776": "Your go-to platform for exclusive trading courses",
"-609665275": "Gain access to comprehensive modules on forex, Deriv MT5, and more.",
"-2125275828": "Unique trade types. Hundreds of instruments. Financial and derived markets.",
"-154889447": "Ready to join over 2.5 million traders who have chosen Deriv as their trusted broker? Enter your email address to create a free demo account.",
"-1957784093": "Easy And Free Sign Up | Online Trading | Deriv.com",
Expand Down
35 changes: 18 additions & 17 deletions gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ const BuildPage = (page, actions) => {
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 = /academy-signup/g.test(page.path)

if (is_careers) {
createRedirect({
Expand Down Expand Up @@ -372,7 +373,14 @@ const BuildPage = (page, actions) => {
isPermanent: true,
})
}

if (is_academy) {
createRedirect({
fromPath: `/${lang}/academy-signup`,
toPath: `/en/academy-signup`,
redirectInBrowser: true,
isPermanent: true,
})
}
return current_page
})
}
Expand Down Expand Up @@ -429,19 +437,14 @@ exports.onCreateWebpackConfig = ({ stage, actions, loaders, getConfig }, { ...op
splitChunks: {
chunks: 'all',
cacheGroups: {
vendor: {
test: /[\\/]node_modules[\\/]/,
name: 'vendors',
chunks: 'all',
priority: -10,
},
bundle: {
test: /\.(js|ts|tsx)$/,
name: 'bundle',
chunks: 'all',
priority: -20,
enforce: true,
},
default: false,
vendors: false,
// Merge all js, ts, and tsx files into one bundle
all: {
test: /\.(js|ts|tsx)$/,
name: 'bundle',
chunks: 'all',
},
},
},
mangleExports: 'size',
Expand All @@ -462,9 +465,7 @@ exports.onCreateWebpackConfig = ({ stage, actions, loaders, getConfig }, { ...op
providedExports: true,
usedExports: true,
},
plugins: [
new StylelintPlugin({ ...style_lint_options, ...options }),
],
plugins: [new StylelintPlugin({ ...style_lint_options, ...options })],
resolve: {
modules: [path.resolve(__dirname, 'src'), 'node_modules'],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const SignUpPageForm = () => {
components={[
<Link
className={link_text}
textcolor="brand"
textcolor="primary"
key={0}
target="_blank"
url={{
Expand Down

0 comments on commit 4e0bd54

Please sign in to comment.