diff --git a/gatsby-node.js b/gatsby-node.js index affeaf1702c..fcbea8c0c9c 100644 --- a/gatsby-node.js +++ b/gatsby-node.js @@ -16,22 +16,6 @@ exports.onCreatePage = ({ page, actions }) => { const is_story = /story/g.test(page.path) const is_market = /markets/g.test(page.path) const is_cfds = /cfds/g.test(page.path) - const is_landing_ebooks =/landing\/ebooks/g.test(page.path) - - if (is_landing_ebooks) { - createRedirect({ - fromPath: `/landing/ebooks/`, - toPath: `/404/`, - redirectInBrowser: true, - isPermanent: true, - }) - createRedirect({ - fromPath: `/landing/ebooks`, - toPath: `/404`, - redirectInBrowser: true, - isPermanent: true, - }) - } if (is_responsible_trading) { createRedirect({ @@ -87,13 +71,13 @@ exports.onCreatePage = ({ page, actions }) => { if (is_story) { createRedirect({ fromPath: `/about/`, - toPath: `/story/`, + toPath: `/about-us/`, redirectInBrowser: true, isPermanent: true, }) createRedirect({ fromPath: `/about`, - toPath: `/story/`, + toPath: `/about-us/`, redirectInBrowser: true, isPermanent: true, }) @@ -191,20 +175,6 @@ exports.onCreatePage = ({ page, actions }) => { isPermanent: true, }) } - if (is_landing_ebooks) { - createRedirect({ - fromPath: `/${lang}/landing/ebooks/`, - toPath: `/${lang}/404/`, - redirectInBrowser: true, - isPermanent: true, - }) - createRedirect({ - fromPath: `/${lang}/landing/ebooks`, - toPath: `/${lang}/404`, - redirectInBrowser: true, - isPermanent: true, - }) - } if (is_contact_us) { createRedirect({ @@ -245,13 +215,13 @@ exports.onCreatePage = ({ page, actions }) => { if (is_story) { createRedirect({ fromPath: `/${lang}/about/`, - toPath: `/${lang}/story/`, + toPath: `/${lang}/about-us/`, redirectInBrowser: true, isPermanent: true, }) createRedirect({ fromPath: `/${lang}/about`, - toPath: `/${lang}/story/`, + toPath: `/${lang}/about-us/`, redirectInBrowser: true, isPermanent: true, }) diff --git a/src/common/utility.js b/src/common/utility.js index 38c1711e51e..d4db141639c 100644 --- a/src/common/utility.js +++ b/src/common/utility.js @@ -314,7 +314,7 @@ export const addScript = (settings) => { // Function to get the user selected language, can be used in the future once need to check other languages export const isChoosenLanguage = () => ({ english: getLanguage() === 'en' }) -// Function to manually replace server's locale ("zh_tw" or "zh_cn") to "zh-tw"/"zh-cn" +// Function to manually replace server's locale ("zh_tw" or "zh_cn") to "zh-tw"/"zh-cn" export const replaceLocale = (locale) => { let checked_locale = locale if (locale === 'zh_tw') { diff --git a/src/components/custom/other-platforms.js b/src/components/custom/other-platforms.js index a2ac2109a52..989e9104004 100644 --- a/src/components/custom/other-platforms.js +++ b/src/components/custom/other-platforms.js @@ -469,6 +469,12 @@ NavMarket.propTypes = { export const NavCompany = ({ onClick }) => ( + } + title={localize('About us')} + onClick={onClick} + to="/about-us/" + /> } title={localize('Our story')} diff --git a/src/components/elements/off-canvas-menu.js b/src/components/elements/off-canvas-menu.js index a6007514fe2..012a139f54a 100644 --- a/src/components/elements/off-canvas-menu.js +++ b/src/components/elements/off-canvas-menu.js @@ -362,6 +362,12 @@ export const OffCanvasMenuWrapper = (props) => { header_style={header_style} style={content_style} > + +
+ +
+ {localize('About us')} +
diff --git a/src/components/layout/footer/main-links.js b/src/components/layout/footer/main-links.js index 3ad09bcb7c2..e42c40be511 100644 --- a/src/components/layout/footer/main-links.js +++ b/src/components/layout/footer/main-links.js @@ -14,6 +14,9 @@ const MainLinksSection = ({ is_ppc, is_ppc_redirect, is_eu_country }) => { Codestin Search App + + {localize('About us')} + {localize('Our story')} diff --git a/src/pages/about-us/index.js b/src/pages/about-us/index.js new file mode 100644 index 00000000000..8d0b7893bfb --- /dev/null +++ b/src/pages/about-us/index.js @@ -0,0 +1,31 @@ +import React from 'react' +import styled from 'styled-components' +import { localize, WithIntl } from 'components/localization' +import { SEO } from 'components/containers' +import Layout from 'components/layout/layout' + +const StyledDiv = styled.div` + font-size: 330%; + background-color: white; +` + +const AboutUs = () => { + return ( + + + About Us new page{' '} + + ) +} + +AboutUs.propTypes = { + // data: PropTypes.object, +} + +export default WithIntl()(AboutUs)