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 cd66bb6

Browse files
prince-derivniloofar-derivmitra-derivvirtualpowwafiona-deriv
authored
Revert production_V20220126_0 & keep tnc changes (#2596)
* Revert production_V20220126_0 * remove DEL refrence from Terms and condition (#2503) * Mitra/ DEL EU footer changes (#2452) * Requried changes on the footer for EU DEL * Removal of the commented section * Requried changes on the footer for EU DEL mobile * Removal of some platforms from footer menu for EU * Remove unused propType for MainLinksSection * Resolve conflicts * Remove redundant prop * Remove DEL from regulatory information page (#2443) * Cherry picked TNC and resolved image conflict * add missing text on footer (#2585) Co-authored-by: fiona-deriv <[email protected]> Co-authored-by: Niloofar Sadeghi <[email protected]> Co-authored-by: mitra-fs <[email protected]> Co-authored-by: Kevin <[email protected]> Co-authored-by: fiona-deriv <[email protected]> Co-authored-by: fiona-deriv <[email protected]>
1 parent ab2975e commit cd66bb6

File tree

160 files changed

+7338
-10975
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

160 files changed

+7338
-10975
lines changed

.lintstagedrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
"src/**/*.{js,jsx,ts,tsx,json,md}": [
77
"prettier --write"
88
]
9-
}
9+
}

gatsby-config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ module.exports = {
3333
options: {
3434
failOnError: true,
3535
base64Width: 20,
36+
forceBase64Format: 'webp',
3637
stripMetadata: true,
3738
defaultQuality: 50,
3839
},

package-lock.json

Lines changed: 5831 additions & 8414 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 33 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -5,34 +5,34 @@
55
"author": "Deriv",
66
"dependencies": {
77
"@artsy/fresnel": "^3.2.1",
8-
"@directus/gatsby-source-directus": "^9.5.0",
8+
"@directus/gatsby-source-directus": "^9.4.2",
99
"@livechat/customer-sdk": "^3.1.0",
1010
"@loadable/component": "^5.15.2",
11-
"@svgr/webpack": "^6.2.0",
11+
"@svgr/webpack": "^6.1.2",
1212
"commander": "^8.3.0",
13-
"crc-32": "^1.2.1",
14-
"embla-carousel-react": "^6.1.1",
13+
"crc-32": "^1.2.0",
14+
"embla-carousel-react": "^6.0.2",
1515
"eslint-import-resolver-node": "^0.3.6",
1616
"extend": "^3.0.2",
1717
"formik": "^2.2.9",
18-
"gatsby": "^4.6.0",
18+
"gatsby": "^4.4.0",
1919
"gatsby-background-image": "^1.6.0",
2020
"gatsby-plugin-anchor-links": "^1.2.1",
21-
"gatsby-plugin-google-tagmanager": "^4.6.0",
22-
"gatsby-plugin-image": "^2.6.0",
23-
"gatsby-plugin-manifest": "^4.6.0",
21+
"gatsby-plugin-google-tagmanager": "^4.4.0",
22+
"gatsby-plugin-image": "^2.4.0",
23+
"gatsby-plugin-manifest": "^4.4.0",
2424
"gatsby-plugin-page-progress": "^2.2.1",
25-
"gatsby-plugin-preact": "^6.6.0",
26-
"gatsby-plugin-react-helmet": "^5.6.0",
27-
"gatsby-plugin-robots-txt": "^1.7.0",
28-
"gatsby-plugin-sharp": "^4.6.0",
29-
"gatsby-plugin-sitemap": "^5.6.0",
25+
"gatsby-plugin-preact": "^6.5.0",
26+
"gatsby-plugin-react-helmet": "^5.4.0",
27+
"gatsby-plugin-robots-txt": "^1.6.14",
28+
"gatsby-plugin-sharp": "^4.4.0",
29+
"gatsby-plugin-sitemap": "^5.4.0",
3030
"gatsby-plugin-svgr": "^3.0.0-beta.0",
3131
"gatsby-plugin-use-query-params": "^1.0.1",
32-
"gatsby-source-filesystem": "^4.6.0",
33-
"gatsby-transformer-sharp": "^4.6.0",
32+
"gatsby-source-filesystem": "^4.4.0",
33+
"gatsby-transformer-sharp": "^4.4.0",
3434
"gbimage-bridge": "^0.2.1",
35-
"i18next": "^21.6.9",
35+
"i18next": "^21.6.5",
3636
"js-cookie": "^2.2.1",
3737
"lottie-web": "^5.8.1",
3838
"match-sorter": "^6.3.1",
@@ -49,21 +49,21 @@
4949
"react-perfect-scrollbar": "^1.5.8",
5050
"use-query-params": "^1.2.3",
5151
"web-push-notifications": "^3.24.0",
52-
"webpack": "^5.67.0"
52+
"webpack": "^5.65.0"
5353
},
5454
"devDependencies": {
55-
"@storybook/addon-actions": "^6.4.14",
56-
"@storybook/addon-essentials": "^6.4.14",
57-
"@storybook/addon-links": "^6.4.14",
58-
"@storybook/builder-webpack5": "^6.4.14",
59-
"@storybook/manager-webpack5": "^6.4.14",
60-
"@storybook/react": "^6.4.14",
61-
"@types/node": "^17.0.12",
55+
"@storybook/addon-actions": "^6.4.9",
56+
"@storybook/addon-essentials": "^6.4.9",
57+
"@storybook/addon-links": "^6.4.9",
58+
"@storybook/builder-webpack5": "^6.4.9",
59+
"@storybook/manager-webpack5": "^6.4.9",
60+
"@storybook/react": "^6.4.9",
61+
"@types/node": "^17.0.8",
6262
"@types/react": "^17.0.38",
6363
"@types/react-dom": "^17.0.11",
64-
"@types/styled-components": "^5.1.21",
65-
"@typescript-eslint/eslint-plugin": "^5.10.1",
66-
"@typescript-eslint/parser": "^5.10.1",
64+
"@types/styled-components": "^5.1.19",
65+
"@typescript-eslint/eslint-plugin": "^5.9.0",
66+
"@typescript-eslint/parser": "^5.9.0",
6767
"babel-eslint": "10.1.0",
6868
"babel-plugin-styled-components": "^2.0.2",
6969
"eslint": "^7.32.0",
@@ -72,22 +72,21 @@
7272
"eslint-plugin-react": "^7.28.0",
7373
"eslint-webpack-plugin": "^3.1.1",
7474
"gatsby-plugin-eslint": "^4.0.2",
75-
"gatsby-plugin-styled-components": "^5.6.0",
75+
"gatsby-plugin-styled-components": "^5.4.0",
7676
"gh-pages": "^3.2.3",
7777
"husky": "^7.0.4",
78-
"lint-staged": "^12.3.1",
79-
"minify-lint-staged": "^0.0.6",
78+
"lint-staged": "^12.1.5",
8079
"npm-force-resolutions": "0.0.10",
8180
"prettier": "^2.5.1",
82-
"query-string": "^7.1.0",
81+
"query-string": "^7.0.1",
8382
"styled-components": "^5.3.3",
84-
"stylelint": "^14.3.0",
83+
"stylelint": "^14.2.0",
8584
"stylelint-config-prettier": "^9.0.3",
8685
"stylelint-config-standard": "^24.0.0",
8786
"stylelint-config-styled-components": "^0.1.1",
8887
"stylelint-processor-styled-components": "^1.10.0",
89-
"stylelint-webpack-plugin": "^3.1.1",
90-
"typescript": "^4.5.5"
88+
"stylelint-webpack-plugin": "^3.1.0",
89+
"typescript": "^4.5.4"
9190
},
9291
"keywords": [
9392
"deriv",

src/components/containers/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import CssGrid, { CssGridColumn } from './css-grid'
88
import SEO from './seo'
99
import Show from './show'
1010
import Box from './box'
11-
import { Desktop, Mobile, EU, UK, ROW, NonEU, NonUK, UKEU } from './visibility'
11+
import { Desktop, Mobile, EU, UK, ROW, NonEU, NonUK } from './visibility'
1212

1313
export {
1414
Container,
@@ -26,7 +26,6 @@ export {
2626
Mobile,
2727
EU,
2828
UK,
29-
UKEU,
3029
ROW,
3130
NonUK,
3231
NonEU,

src/components/containers/visibility.tsx

Lines changed: 23 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -64,20 +64,6 @@ const deviceRenderer = (): boolean => {
6464
return is_loaded
6565
}
6666

67-
export const getCountryRule = () => {
68-
const { is_eu_domain, is_uk_domain } = domainBasedCheck()
69-
const { is_eu_country, is_uk_country } = React.useContext<StoreDataType>(DerivStore)
70-
71-
const is_eu = (is_eu_country || is_eu_domain) && !is_uk_country
72-
const is_uk = is_uk_country || is_uk_domain
73-
const is_non_uk = !is_uk
74-
const is_non_eu = !is_eu
75-
const is_eu_uk = !(!is_eu && !is_uk)
76-
const is_row = !is_eu_uk
77-
78-
return { is_eu, is_uk, is_non_uk, is_non_eu, is_eu_uk, is_row }
79-
}
80-
8167
export const Desktop = ({
8268
children,
8369
breakpoint = DEFAULT_BREAKPOINT,
@@ -110,37 +96,47 @@ export const Mobile = ({ children, breakpoint = DEFAULT_BREAKPOINT }: Responsive
11096
}
11197

11298
export const EU = ({ children }: ResponsiveContainerProps) => {
113-
const { is_eu } = getCountryRule()
99+
const { is_eu_domain } = domainBasedCheck()
100+
const { is_eu_country } = React.useContext<StoreDataType>(DerivStore)
101+
102+
const is_eu = is_eu_country || is_eu_domain
114103

115104
return is_eu ? <>{children}</> : null
116105
}
117106

118107
export const NonEU = ({ children }: ResponsiveContainerProps) => {
119-
const { is_non_eu } = getCountryRule()
108+
const { is_eu_domain } = domainBasedCheck()
109+
const { is_eu_country } = React.useContext<StoreDataType>(DerivStore)
110+
111+
const is_eu = is_eu_domain || is_eu_country
120112

121-
return is_non_eu ? <>{children}</> : null
113+
return !is_eu ? <>{children}</> : null
122114
}
123115

124116
export const UK = ({ children }: ResponsiveContainerProps) => {
125-
const { is_uk } = getCountryRule()
117+
const { is_uk_domain } = domainBasedCheck()
118+
const { is_uk_country } = React.useContext<StoreDataType>(DerivStore)
119+
120+
const is_uk = is_uk_country || is_uk_domain
126121

127122
return is_uk ? <>{children}</> : null
128123
}
129124

130125
export const NonUK = ({ children }: ResponsiveContainerProps) => {
131-
const { is_non_uk } = getCountryRule()
132-
133-
return is_non_uk ? <>{children}</> : null
134-
}
126+
const { is_uk_domain } = domainBasedCheck()
127+
const { is_uk_country } = React.useContext<StoreDataType>(DerivStore)
135128

136-
export const UKEU = ({ children }: ResponsiveContainerProps) => {
137-
const { is_eu_uk } = getCountryRule()
129+
const is_uk = is_uk_domain || is_uk_country
138130

139-
return is_eu_uk ? <>{children}</> : null
131+
return !is_uk ? <>{children}</> : null
140132
}
141133

142134
export const ROW = ({ children }: ResponsiveContainerProps) => {
143-
const { is_row } = getCountryRule()
135+
const { is_uk_domain, is_eu_domain } = domainBasedCheck()
136+
const { is_uk_country, is_eu_country } = React.useContext<StoreDataType>(DerivStore)
137+
138+
const is_uk = is_uk_country || is_uk_domain
139+
const is_eu = is_eu_domain || is_eu_country
144140

145-
return is_row ? <>{children}</> : null
141+
return !is_eu && !is_uk ? <>{children}</> : null
146142
}

src/components/containers/wrapper.tsx

Lines changed: 0 additions & 22 deletions
This file was deleted.

src/components/custom/_signup-public.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ const StyledSectionContainer = styled(Box).attrs({ as: 'section' })`
2929
background-color: var(--color-white);
3030
3131
@media ${device.tabletL} {
32-
padding: 0 0 40px;
32+
padding: 41px 0 40px;
3333
}
3434
`
3535
const Wrapper = styled.div`
3636
border-radius: 8px;
37-
background: linear-gradient(241.92deg, #d74b56 12.96%, #d1632f 86.33%);
37+
background-image: linear-gradient(73deg, #ff6444, #ff444f);
3838
background-repeat: round;
3939
position: relative;
4040
display: flex;
@@ -374,7 +374,7 @@ const SignupPublic = ({
374374
background="white"
375375
tabletBackground="green-1"
376376
inputColor="grey-5"
377-
inputBackground="white"
377+
inputBackground="grey-8"
378378
labelFocusColor="grey-7"
379379
labelColor="black-3"
380380
labelSize="16px"
@@ -387,6 +387,7 @@ const SignupPublic = ({
387387
autoFocus={autofocus}
388388
autoComplete="off"
389389
required
390+
border="unset"
390391
height="40px"
391392
focusBorder="var(--color-grey-7)"
392393
/>
@@ -411,7 +412,7 @@ const SignupPublic = ({
411412
handleChangeCheckbox={handleChange}
412413
/>
413414
<SocialWrapper jc="unset" ai="center">
414-
<SignInText>{localize('Or sign up with')}</SignInText>
415+
<SignInText>{localize('Or sign in with')}</SignInText>
415416
<SocialButton
416417
onClick={handleSocialSignup}
417418
provider="google"

src/components/custom/other-platforms.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -139,10 +139,12 @@ export const DMT5Card = ({ is_selected, is_ppc_redirect, word_break_cover }) =>
139139
<StyledLink aria_label="DMT5" to={is_ppc_redirect ? '/landing/dmt5/' : '/dmt5/'}>
140140
<Card
141141
cover_background="var(--color-green)"
142-
cover_content={localize('Discover Deriv MT5 now')}
143-
title={localize('Deriv MT5')}
142+
cover_content={localize('Discover DMT5 now')}
143+
title={localize('DMT5')}
144144
Icon={() => <StyledDmt5 src={DMT5} alt="" width="72" height="72" />}
145-
content={[localize('Trade on Deriv MT5, the all-in-one CFD trading platform.')]}
145+
content={[
146+
localize('Trade on Deriv MT5 (DMT5), the all-in-one FX and CFD trading platform.'),
147+
]}
146148
is_inline_icon
147149
min_height="12.4rem"
148150
is_selected={is_selected}
@@ -312,12 +314,12 @@ export const NavPlatform = ({ onClick, is_ppc, is_ppc_redirect }) => {
312314
<Flex direction="column" wrap="wrap" jc="flex-start">
313315
<StyledText>{localize('Trading platforms')}</StyledText>
314316
<NavCard
315-
aria_label="Deriv MT5"
317+
aria_label="DMT5"
316318
icon={() => <img src={DMT5} alt="" width="32" height="32" />}
317319
content={
318-
<Localize translate_text="Trade on Deriv MT5, the all-in-one CFD trading platform." />
320+
<Localize translate_text="Trade on Deriv MT5 (DMT5), the all-in-one FX and CFD trading platform." />
319321
}
320-
title={<Localize translate_text="Deriv MT5" />}
322+
title={<Localize translate_text="DMT5" />}
321323
onClick={onClick}
322324
to={is_ppc_redirect ? '/landing/dmt5/' : '/dmt5/'}
323325
/>

src/components/elements/background-image.js

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -14,26 +14,10 @@ const StyledBackground = styled(BackgroundImage)`
1414
}
1515
`
1616

17-
export const Background = ({
18-
children,
19-
dark,
20-
data,
21-
fluid,
22-
is_unstyled = false,
23-
style,
24-
...props
25-
}) => {
17+
export const Background = ({ children, data, fluid, style, dark, ...props }) => {
2618
const image = getImage(data)
2719
const bgImage = convertToBgImage(image)
2820

29-
if (is_unstyled) {
30-
return (
31-
<BackgroundImage Tag="div" {...bgImage} {...props}>
32-
{children}
33-
</BackgroundImage>
34-
)
35-
}
36-
3721
return (
3822
<StyledBackground Tag="div" style={style} dark={dark} fluid={fluid} {...bgImage} {...props}>
3923
{children}
@@ -47,7 +31,7 @@ Background.propTypes = {
4731
dark: PropTypes.string,
4832
data: PropTypes.object,
4933
fluid: PropTypes.array,
50-
is_unstyled: PropTypes.bool,
34+
img_name: PropTypes.string,
5135
style: PropTypes.object,
5236
}
5337
export default Background

src/components/elements/card.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,8 +324,8 @@ const FlexHover = styled(Flex)`
324324
const SvgWrapper = styled.div`
325325
& > svg,
326326
img {
327-
width: 32px;
328-
height: 32px;
327+
width: 33px;
328+
height: 33px;
329329
margin-right: 1.6rem;
330330
331331
@media ${device.mobileL} {

0 commit comments

Comments
 (0)