From ab42ac1dbacd44467621405cc8bc8cee1caf7711 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CkonstantinosG-deriv=E2=80=9D?= <“konstantinos.gkagiannis@regentmarkets.com”> Date: Mon, 6 Nov 2023 12:32:12 +0100 Subject: [PATCH] feat: change pdf file and redirection --- gatsby-node.js | 10 ++++++++++ src/pages/regulatory/index.tsx | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/gatsby-node.js b/gatsby-node.js index 2fc6371fc6a..b8a63bc938f 100644 --- a/gatsby-node.js +++ b/gatsby-node.js @@ -18,6 +18,16 @@ exports.onCreatePage = ({ 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_regulatory = /regulatory/g.test(page.path) + + if (is_regulatory) { + createRedirect({ + fromPath: `/regulatory/Deriv_Ltd_membership.pdf`, + toPath: `/regulatory/deriv-com-ltd-membership.pdf`, + redirectInBrowser: true, + isPermanent: true, + }) + } if (is_careers) { createRedirect({ diff --git a/src/pages/regulatory/index.tsx b/src/pages/regulatory/index.tsx index 8c7f3c0c84d..f4e44cfc3f2 100644 --- a/src/pages/regulatory/index.tsx +++ b/src/pages/regulatory/index.tsx @@ -470,7 +470,7 @@ const Regulatory = (locale: RegulatoryProps) => { , ]}