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

Commit

Permalink
chore: ?? scripts/trustpilot-src.js
Browse files Browse the repository at this point in the history
  • Loading branch information
prince-deriv committed Dec 13, 2023
2 parents 5fdd7fd + 3c6667e commit 522c753
Show file tree
Hide file tree
Showing 50 changed files with 1,864 additions and 1,821 deletions.
1 change: 1 addition & 0 deletions .github/workflows/pre-generate-preview-link.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
mkdir -p ./pr
echo ${{ github.event.number }} > ./pr/NR
echo ${{ github.event.pull_request.user.login }} > ./pr/USERNAME
echo ${{ github.head_ref }} > ./pr/BRANCHNAME
- name: Upload PR information to artifact
uses: actions/upload-artifact@v2
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ jobs:
- run: npm run format
- run: npm run test
- run: npm run build

- run: echo $GIT_TAG_NAME > public/version.txt

- name: Remove Storybook
uses: JesseTG/[email protected]
with:
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/smoketests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ jobs:
run: |
echo "issue_number=$(cat ./pr/NR)" >> $GITHUB_OUTPUT
echo "preview_url=$(cat ./pr/PREVIEW_URL)" >> $GITHUB_OUTPUT
echo "branch_name=$(cat ./pr/BRANCHNAME)" >> $GITHUB_OUTPUT
echo "user_name=$(cat ./pr/USERNAME)" >> $GITHUB_OUTPUT
- name: Checkout external repository with Cypress tests
uses: actions/checkout@v4
Expand All @@ -46,6 +48,7 @@ jobs:

- name: Cypress run
# Uses the official Cypress GitHub action https://github.com/cypress-io/github-action
if: "!contains(steps.pr_information.outputs.branch_name, 'translation-new-homepage')"
uses: cypress-io/github-action@v6
with:
# Records to Cypress Cloud
Expand All @@ -64,11 +67,11 @@ jobs:
# Set Base Url from client_payload.
CYPRESS_BASE_URL: ${{ steps.pr_information.outputs.preview_url }}
# Send PR details to Cypress test run
COMMIT_INFO_MESSAGE: PR "${{ steps.pr_information.outputs.issue_number }}" in Repo "${{ github.repository }}" (v2)
COMMIT_INFO_MESSAGE: PR "${{ steps.pr_information.outputs.issue_number }}" Changed By "${{ steps.pr_information.outputs.user_name }}" in Branch "${{ steps.pr_information.outputs.branch_name }}"

- name: Set comments message
id: set_msg
if: always()
if: always() && !contains(steps.pr_information.outputs.branch_name, 'translation-new-homepage')
run: |
# Using shell script to conditionally set the message
if [[ "${{ job.status }}" == "success" ]]; then
Expand All @@ -78,7 +81,7 @@ jobs:
fi
- name: Leave comment
if: always()
if: always() && !contains(steps.pr_information.outputs.branch_name, 'translation-new-homepage')
uses: marocchino/sticky-pull-request-comment@v2
with:
header: Smoke tests status update
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ jobs:
# - run: npm run test
- run: npm run build
# - run: npm run build:storybook
- run: echo $GITHUB_SHA > public/version.txt

- uses: olegtarasov/[email protected]
id: tagName
# For using same tag for staging and production we need to uncomment these two below lines:
Expand Down
15 changes: 8 additions & 7 deletions crowdin/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,7 @@
"517286342": "<p>To place a vanilla options contract, you’ll need to:</p><ul><li>Select the underlying asset you want to trade.</li><li>Determine your contract duration or end time.</li><li>Predict the asset’s price movement by choosing Call or Put.</li><li>Select your preferred strike price</li><li>Enter your stake.</li><li>Purchase the contract</li></ul>",
"517833647": "Volatility 50 (1s) Index",
"517844699": "Alibaba Group Holding Ltd",
"518861708": "Open a demo Deriv MT5 or demo Deriv X account and practise with an unlimited amount of virtual funds.",
"518906831": "Can I use the same address to make a cryptocurrency deposit?",
"519988278": "Fox Corp Class B",
"520136698": "Boom 500 Index",
Expand Down Expand Up @@ -588,7 +589,6 @@
"564216330": "<0>1 lot</0> with 300 leverage:",
"566274201": "1. Market",
"567322404": "Antivirus",
"567501407": "Currently available on demo accounts only",
"567739189": "Why do my Deriv MT5 positions always start with a loss?",
"568729968": "responsive platform",
"570656160": "You can use your Deriv MT5 demo account for as long as you want. However, if your account is inactive for 30 days, we'll deactivate it automatically.",
Expand Down Expand Up @@ -619,6 +619,7 @@
"590858519": "Say goodbye to overnight charges, keep your positions open for as long as you want.*",
"591295543": "Dynamic tiers ⁠— Stock indices",
"591710014": "Why trade baskets on Deriv",
"592964176": "Join over 2.5 million traders",
"595022058": "100",
"595278941": "Asset price",
"595722471": "Return to player (RTP) % for lookbacks for a multiplier of 1 and 1m duration is around 87% on average.",
Expand Down Expand Up @@ -1894,6 +1895,7 @@
"1822982010": "<0>EFA.US</0> The iShares MSCI EAFE ETF tracks an index of large- and mid-capitalisation developed market equities outside of the US and Canada.",
"1823119628": "the Vanuatu Financial Services Commission",
"1823770507": "DOT/USD",
"1823821664": "Available on Demo accounts only",
"1824094317": "24x7 trading",
"1826550764": "Why choose us",
"1826719972": "stock indices",
Expand Down Expand Up @@ -4109,16 +4111,16 @@
"-2121510827": "Sweden",
"-1357648282": "For fair resolution of any complaints, please <0>chat</0> with us. To learn more, see our <1>complaint policy</1>.",
"-1838458999": "For fair resolution of any complaints, please <0>chat</0> with us.",
"-1131400885": "Deriv Investments (Europe) Limited",
"-1231248751": "Deriv Investments (Europe) Limited (Company No. C 70156), incorporated on the 22nd April 2015, is registered in Malta with its registered office located at Level 3, W Business Centre, Triq Dun Karm, Birkirkara BKR9033, Malta. Deriv Investments (Europe) Ltd is licensed in Malta and regulated by the Malta Financial Services Authority under the Investments Services Act <0>(view licence)</0> to provide investment services.",
"-2051445931": "Clients in the European Union who wish to trade financial instruments can have accounts under Deriv Investments (Europe) Limited.",
"-1446148261": "CFDs - Forex",
"-1121949345": "CFDs - Stock indices",
"-33096025": "CFDs - Cryptocurrencies",
"-2132026042": "CFDs - Commodities",
"-1238176624": "CFDs - Synthetics: Volatility 250 (1s) Index",
"-1076679821": "Multipliers - Cryptocurrencies",
"-812435767": "Multipliers - Synthetics: Crash 300 Index",
"-1131400885": "Deriv Investments (Europe) Limited",
"-1231248751": "Deriv Investments (Europe) Limited (Company No. C 70156), incorporated on the 22nd April 2015, is registered in Malta with its registered office located at Level 3, W Business Centre, Triq Dun Karm, Birkirkara BKR9033, Malta. Deriv Investments (Europe) Ltd is licensed in Malta and regulated by the Malta Financial Services Authority under the Investments Services Act <0>(view licence)</0> to provide investment services.",
"-2051445931": "Clients in the European Union who wish to trade financial instruments can have accounts under Deriv Investments (Europe) Limited.",
"-112814932": "Deriv (FX) Ltd",
"-1269257733": "Clients in the rest of the world (except for restricted countries such as the USA, Canada, and Hong Kong) who wish to trade CFDs on forex and cryptocurrencies can have MT5 Financial STP accounts under Deriv (FX) Ltd.",
"-2019617323": "Deriv (BVI) Ltd",
Expand Down Expand Up @@ -4208,9 +4210,6 @@
"-943253121": "The term ‘margin’ refers to the deposit needed to open a leveraged position, which is a position larger than your capital investment and leads to increased market exposure.",
"-339497727": "Trade types margin market",
"-1009744297": "Use our margin calculator to calculate the margin required to increase your market exposure (the market value of your position) on Deriv’s CFD trading platforms.",
"-1603400333": "Open a demo CFDs account and practise with an unlimited amount of virtual funds.",
"-446423672": "Open a demo Deriv MT5, Deriv X, or Deriv cTrader account and practise with an unlimited amount of virtual funds.",
"-1978157334": "Trade with a real Deriv MT5, Deriv X, or Deriv cTrader account and get access to high leverage to trade positions larger than your existing capital.",
"-1207172200": "Start trading CFDs on Deriv",
"-1703690406": "When you trade CFDs on margin, you increase your market exposure, thus amplifying both your potential profit and potential loss.",
"-843831637": "Stop loss",
Expand Down Expand Up @@ -4247,6 +4246,8 @@
"-894512007": "favourite markets icon",
"-252740007": "instant access icon",
"-1156092900": "flexible icon",
"-1603400333": "Open a demo CFDs account and practise with an unlimited amount of virtual funds.",
"-1242544018": "Trade with a real Deriv MT5 or real Deriv X account and get access to high leverage to trade positions larger than your existing capital.",
"-544150655": "Markets available for margin trading",
"-867909844": "Access over 30 assets and also trade with up to 1:30 leverage and zero commission on trades.",
"-309438223": "Trade synthetic indices on margin 24/7 without being affected by natural events and liquidity risks.",
Expand Down
14 changes: 7 additions & 7 deletions gatsby-browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ import './static/css/ubuntu.css'

const is_browser = typeof window !== 'undefined'

export const replaceHydrateFunction = () => {
return (element, container) => {
const root = createRoot(container)
root.render(element)
}
}

const checkDomain = () => {
return eval(
decodeURIComponent(
Expand Down Expand Up @@ -164,11 +171,4 @@ export const onRouteUpdate = ({ location }) => {
}, 1500)
}

export const replaceHydrateFunction = () => {
return (element, container) => {
const root = createRoot(container)
root.render(element)
}
}

export const wrapPageElement = WrapPagesWithLocaleContext
2 changes: 1 addition & 1 deletion src/components/elements/stepper-view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import React from 'react'
import styled, { css } from 'styled-components'
import { useIsRtl } from 'components/hooks/use-isrtl'
import CommonHeaderSection from 'components/elements/common-header-section'
import { TString } from 'types/generics'
import { useBrowserResize } from 'components/hooks/use-browser-resize'
import { TString } from 'types/generics'

const Checkmark = styled.span<{ is_rtl: boolean }>`
display: inline-block;
Expand Down
5 changes: 3 additions & 2 deletions src/features/components/molecules/layout-overlay/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { Suspense, lazy } from 'react'
import React, { lazy, Suspense } from 'react'
import pMinDelay from 'p-min-delay'
import loadable from '@loadable/component'
import { overlay_container } from './layout-overlay.module.scss'
Expand All @@ -8,10 +8,11 @@ import { useIsRtl } from 'components/hooks/use-isrtl'

const LiveChatButton = loadable(() => pMinDelay(import('./live-chat-button'), 5000))
const WhatsappButton = loadable(() => pMinDelay(import('./whats-app-button'), 5000))
const CookieBanner = lazy(() => pMinDelay(import('./cookie-banner'), 5000))
const CookieBanner = lazy(() => import('./cookie-banner'))

const LayoutOverlay = () => {
const is_rtl = useIsRtl()

return (
<Flex.Box
id="overlay-container"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ const WhatAreDigitalOptions = ({
gap={'8x'}
className={options_heading_section}
>
{is_coming_soon && <Label text="_t_Coming soon_t_" bgcolor="blue" />}
{is_coming_soon && (
<Label text="_t_Available on Demo accounts only_t_" bgcolor="blue" />
)}
<Typography.Heading align="center" as="h1">
<Localize translate_text={heading} />
</Typography.Heading>
Expand Down
1 change: 1 addition & 0 deletions src/features/pages/home/trade-types/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { TString } from 'types/generics'
const TradeTypes = () => {
const { is_eu } = useRegion()
const visible_items = useVisibleContent({ content: tradeTypesItems, config: { is_eu } })

const title_text: TString = useMemo(() => {
return is_eu
? '_t_Trade the way you want with 2 flexible trade types._t_'
Expand Down
54 changes: 29 additions & 25 deletions src/features/pages/options/accumulator/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,33 +13,37 @@ import AvailableMarketPlatforms from 'features/components/organisms/available-ma
import OptionsFaq from 'features/components/templates/options-faq'
import Flex from 'features/components/atoms/flex-box'

const AccumulatorsOptions = () => {
interface AccumulatorsOptionsProps {
is_coming_soon?: boolean
}

const AccumulatorsOptions = ({ is_coming_soon = true }: AccumulatorsOptionsProps) => {
return (
<OptionsLayout
heading="_t_What are accumulator options?_t_"
description="_t_Accumulator options allow you to predict whether the current spot price remains within a predefined range from the previous spot price._t_"
>
<Typography.Heading
as="h2"
align="center"
padding_block="6x"
md={{ padding_block: '20x' }}
size="small"
<>
<OptionsLayout
heading="_t_What are accumulator options?_t_"
description="_t_Accumulator options allow you to predict whether the current spot price remains within a predefined range from the previous spot price._t_"
is_coming_soon={is_coming_soon}
>
<Localize translate_text="_t_How do accumulator options work?_t_" />
</Typography.Heading>
<OptionsContent items={accumulatorOptionsContentItems} />
<Flex.Box justify="center" align="center" direction="col">
<AvailableMarketPlatforms
markets={accumulatorMarkets}
platforms={accumulatorPlatforms}
/>
<Typography.Paragraph font_family="UBUNTU" mt="20x">
<Localize translate_text="_t_Currently available on demo accounts only_t_" />
</Typography.Paragraph>
</Flex.Box>
<OptionsFaq faqs={accumulatorFAQ} />
</OptionsLayout>
<Typography.Heading
as="h2"
align="center"
padding_block="6x"
md={{ padding_block: '20x' }}
size="small"
>
<Localize translate_text="_t_How do accumulator options work?_t_" />
</Typography.Heading>
<OptionsContent items={accumulatorOptionsContentItems} />
<Flex.Box justify="center" align="center" direction="col">
<AvailableMarketPlatforms
markets={accumulatorMarkets}
platforms={accumulatorPlatforms}
/>
</Flex.Box>
<OptionsFaq faqs={accumulatorFAQ} />
</OptionsLayout>
</>
)
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'
import { connectivity_items } from './data'
import ConnectivityReliabilityItem from './connectivity-reliability-item'
import { item_container } from './styles.module.scss'
import ConnectivityReliabilityItem from './connectivity-reliability-item'
import Container from 'features/components/atoms/container'
import Typography from 'features/components/atoms/typography'
import { Localize } from 'components/localization'
Expand Down
11 changes: 5 additions & 6 deletions src/features/pages/signup/form-container/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react'
import { signup_form_container, signup_form_line } from '../signup.module.scss'
import { signup_form_container, signup_form_line, link_text } from '../signup.module.scss'
import FormSocialButtons from './form-social-buttons'
import SignUpPageForm from './signup-page-form'
import Flex from 'features/components/atoms/flex-box'
Expand Down Expand Up @@ -30,18 +30,17 @@ const SignUpFormContainer = () => {
className={signup_form_container}
>
<Typography.Heading size={is_mobile_or_tablet ? 'small' : 'xs'}>
<Localize translate_text="_t_Sign up_t_" />
<Localize translate_text="_t_Join over 2.5 million traders_t_" />
</Typography.Heading>
<Typography.Paragraph size={is_mobile_or_tablet ? 'large' : 'medium'}>
<Localize translate_text="_t_Enter your email address to begin_t_" />
</Typography.Paragraph>

<SignUpPageForm />
<Typography.Paragraph textcolor="secondary" size={is_mobile_or_tablet ? 'small' : 'xs'}>
<Localize
translate_text="_t_By pressing “Create demo account”, you confirm that you are 18 or older. You understand that we may use your email address to send you information about Deriv products and services as well as market news. You can always unsubscribe from these emails in your account settings. For more information, please take a look at Deriv’s <0>Security and privacy</0>._t_"
components={[
<Link
textcolor="brand"
className={link_text}
textcolor="primary"
key={0}
url={{
target: '_blank',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react'
import { link_text } from '../signup.module.scss'
import Flex from 'features/components/atoms/flex-box'
import { TString } from 'types/generics'
import Button from 'features/components/atoms/button'
Expand Down Expand Up @@ -42,7 +43,8 @@ const SignUpPageForm = () => {
translate_text="_t_I agree to the <0>terms and conditions</0>_t_"
components={[
<Link
textcolor="brand"
className={link_text}
textcolor="primary"
key={0}
target="_blank"
url={{
Expand Down
7 changes: 7 additions & 0 deletions src/features/pages/signup/signup.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,10 @@
.signup_apple_btn {
background-color: #000000;
}
.link_text {
text-decoration: underline;
&:hover {
text-decoration-color: #000000;
color: $text-color-primary;
}
}
1 change: 1 addition & 0 deletions src/pages/markets/commodities/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { TGatsbyHead } from 'features/types'

const CommoditiesPage = () => {
const { is_row } = useRegion()

const hero_description = is_row
? '_t_Trade popular assets in the commodities market such as silver, gold, oil, and more without owning the underlying asset. Speculate on the price movements and benefit from our high leverage and competitive spreads._t_'
: '_t_Trade popular assets in the commodities market such as silver, gold, oil, and more without owning the underlying asset. Speculate on the price movements and benefit from our competitive spreads._t_'
Expand Down
24 changes: 13 additions & 11 deletions src/pages/markets/cryptocurrencies/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,19 @@ import { SEO } from 'components/containers'
import SignupPublic from 'features/components/templates/signup/with-banner'
import { TGatsbyHead } from 'features/types'

const CryptocurrenciesPage = () => (
<Layout type="noNav">
<DerivedFXHero
title="_t_Cryptocurrencies_t_"
description="_t_Take advantage of a highly liquid market with round-the-clock trading. Profit from correctly predicting the movement of the world's most popular cryptocurrencies._t_"
is_cryptocurrencies
/>
<Cryptocurrencies simple_step_content={simple_step_content_cryptocurrencies} />
<SignupPublic />
</Layout>
)
const CryptocurrenciesPage = () => {
return (
<Layout type="noNav">
<DerivedFXHero
title="_t_Cryptocurrencies_t_"
description="_t_Take advantage of a highly liquid market with round-the-clock trading. Profit from correctly predicting the movement of the world's most popular cryptocurrencies._t_"
is_cryptocurrencies
/>
<Cryptocurrencies simple_step_content={simple_step_content_cryptocurrencies} />
<SignupPublic />
</Layout>
)
}

export default WithIntl()(CryptocurrenciesPage)

Expand Down
Loading

0 comments on commit 522c753

Please sign in to comment.