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

Commit

Permalink
feat: change pdf file and redirection
Browse files Browse the repository at this point in the history
  • Loading branch information
“konstantinosG-deriv” committed Nov 6, 2023
1 parent 37f5a63 commit ab42ac1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down
2 changes: 1 addition & 1 deletion src/pages/regulatory/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ const Regulatory = (locale: RegulatoryProps) => {
<StyledLinkText
key={0}
target="_blank"
href="/regulatory/Deriv_Ltd_membership.pdf"
href="/regulatory/deriv-com-ltd-membership.pdf"
rel="noopener noreferrer"
/>,
]}
Expand Down

0 comments on commit ab42ac1

Please sign in to comment.