Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit d753721

Browse files
nikolaiberestevich-derivNikolai Berestevich
authored andcommitted
Nikolai.berestevich/feat/add about us page (#2310)
* dasfs * nikolai.berestevich/feat:add new about-us page, make links in footer and header * nikolai.berestevich/feat/add header and footer * nikolai.berestevich/fix/SEO Co-authored-by: Nikolai Berestevich <[email protected]>
1 parent 76ae5f5 commit d753721

File tree

6 files changed

+51
-35
lines changed

6 files changed

+51
-35
lines changed

gatsby-node.js

Lines changed: 4 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,6 @@ exports.onCreatePage = ({ page, actions }) => {
1616
const is_story = /story/g.test(page.path)
1717
const is_market = /markets/g.test(page.path)
1818
const is_cfds = /cfds/g.test(page.path)
19-
const is_landing_ebooks =/landing\/ebooks/g.test(page.path)
20-
21-
if (is_landing_ebooks) {
22-
createRedirect({
23-
fromPath: `/landing/ebooks/`,
24-
toPath: `/404/`,
25-
redirectInBrowser: true,
26-
isPermanent: true,
27-
})
28-
createRedirect({
29-
fromPath: `/landing/ebooks`,
30-
toPath: `/404`,
31-
redirectInBrowser: true,
32-
isPermanent: true,
33-
})
34-
}
3519

3620
if (is_responsible_trading) {
3721
createRedirect({
@@ -87,13 +71,13 @@ exports.onCreatePage = ({ page, actions }) => {
8771
if (is_story) {
8872
createRedirect({
8973
fromPath: `/about/`,
90-
toPath: `/story/`,
74+
toPath: `/about-us/`,
9175
redirectInBrowser: true,
9276
isPermanent: true,
9377
})
9478
createRedirect({
9579
fromPath: `/about`,
96-
toPath: `/story/`,
80+
toPath: `/about-us/`,
9781
redirectInBrowser: true,
9882
isPermanent: true,
9983
})
@@ -191,20 +175,6 @@ exports.onCreatePage = ({ page, actions }) => {
191175
isPermanent: true,
192176
})
193177
}
194-
if (is_landing_ebooks) {
195-
createRedirect({
196-
fromPath: `/${lang}/landing/ebooks/`,
197-
toPath: `/${lang}/404/`,
198-
redirectInBrowser: true,
199-
isPermanent: true,
200-
})
201-
createRedirect({
202-
fromPath: `/${lang}/landing/ebooks`,
203-
toPath: `/${lang}/404`,
204-
redirectInBrowser: true,
205-
isPermanent: true,
206-
})
207-
}
208178

209179
if (is_contact_us) {
210180
createRedirect({
@@ -245,13 +215,13 @@ exports.onCreatePage = ({ page, actions }) => {
245215
if (is_story) {
246216
createRedirect({
247217
fromPath: `/${lang}/about/`,
248-
toPath: `/${lang}/story/`,
218+
toPath: `/${lang}/about-us/`,
249219
redirectInBrowser: true,
250220
isPermanent: true,
251221
})
252222
createRedirect({
253223
fromPath: `/${lang}/about`,
254-
toPath: `/${lang}/story/`,
224+
toPath: `/${lang}/about-us/`,
255225
redirectInBrowser: true,
256226
isPermanent: true,
257227
})

src/common/utility.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ export const addScript = (settings) => {
315315
// Function to get the user selected language, can be used in the future once need to check other languages
316316
export const isChoosenLanguage = () => ({ english: getLanguage() === 'en' })
317317

318-
// Function to manually replace server's locale ("zh_tw" or "zh_cn") to "zh-tw"/"zh-cn"
318+
// Function to manually replace server's locale ("zh_tw" or "zh_cn") to "zh-tw"/"zh-cn"
319319
export const replaceLocale = (locale) => {
320320
let checked_locale = locale
321321
if (locale === 'zh_tw') {

src/components/custom/other-platforms.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,12 @@ NavMarket.propTypes = {
469469

470470
export const NavCompany = ({ onClick }) => (
471471
<Flex direction="column" wrap="wrap" jc="flex-start" max_width="42rem">
472+
<CardLink
473+
icon={() => <img src={Story} alt="" width="24" height="24" />}
474+
title={localize('About us')}
475+
onClick={onClick}
476+
to="/about-us/"
477+
/>
472478
<CardLink
473479
icon={() => <img src={Story} alt="" width="24" height="24" />}
474480
title={localize('Our story')}

src/components/elements/off-canvas-menu.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,12 @@ export const OffCanvasMenuWrapper = (props) => {
362362
header_style={header_style}
363363
style={content_style}
364364
>
365+
<StyledLink to="/about-us" onClick={handleArrowClick}>
366+
<div>
367+
<img src={Story} alt="" width="24" height="24" />
368+
</div>
369+
<span>{localize('About us')}</span>
370+
</StyledLink>
365371
<StyledLink to="/story/" onClick={handleArrowClick}>
366372
<div>
367373
<img src={Story} alt="" width="24" height="24" />

src/components/layout/footer/main-links.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ const MainLinksSection = ({ is_ppc, is_ppc_redirect, is_eu_country }) => {
1414
<LinkWrapper>
1515
<Title>{localize('ABOUT')}</Title>
1616
</LinkWrapper>
17+
<LinkWrapper first_child="true">
18+
<Link to="/about-us/">{localize('About us')}</Link>
19+
</LinkWrapper>
1720
<LinkWrapper first_child="true">
1821
<Link to="/story/">{localize('Our story')}</Link>
1922
</LinkWrapper>

src/pages/about-us/index.js

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import React from 'react'
2+
import styled from 'styled-components'
3+
import { localize, WithIntl } from 'components/localization'
4+
import { SEO } from 'components/containers'
5+
import Layout from 'components/layout/layout'
6+
7+
const StyledDiv = styled.div`
8+
font-size: 330%;
9+
background-color: white;
10+
`
11+
12+
const AboutUs = () => {
13+
return (
14+
<Layout>
15+
<SEO
16+
// title and description from story page, needs new?
17+
title={localize('About Us | An Online Trading Platform | Deriv.com')}
18+
description={localize(
19+
'Deriv.com - A Binary.com brand, is a pioneer and award-winning online trading platform in the trading market.',
20+
)}
21+
/>
22+
<StyledDiv>About Us new page</StyledDiv>{' '}
23+
</Layout>
24+
)
25+
}
26+
27+
AboutUs.propTypes = {
28+
// data: PropTypes.object,
29+
}
30+
31+
export default WithIntl()(AboutUs)

0 commit comments

Comments
 (0)