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

Commit

Permalink
Merge branch 'master' of github.com:binary-com/deriv-com into transla…
Browse files Browse the repository at this point in the history
…tion-0498-update_statment_on_sign_up
  • Loading branch information
mayuran-deriv committed Jan 4, 2024
2 parents b0e8c10 + 1e46c2d commit 99cb9e1
Show file tree
Hide file tree
Showing 55 changed files with 4,978 additions and 4,923 deletions.
2 changes: 1 addition & 1 deletion crowdin/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -3386,7 +3386,7 @@
"-2048678807": "DBot Trading | Auto Trading Robot | Deriv",
"-490244393": "pre-built strategies included",
"-410563285": "Start with a popular strategy",
"-1612626587": "Martingale, D'Alembert, and Oscar's Grind — load and customise proven strategies or create your own from scratch.",
"-2090265979": "Martingale, D'Alembert, Oscar's Grind, and more — load and customise proven strategies or create your own from scratch.",
"-1171659940": "Build your strategy visually",
"-1855708032": "Simply drag, drop, and configure pre-built blocks and indicators onto a canvas to build your bot. No coding needed.",
"-1502830211": "Increase your profits",
Expand Down
49 changes: 44 additions & 5 deletions gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,9 @@ exports.onPreBuild = async () => {
await copyLibFiles(path.join(__dirname, 'static', '~partytown'))
}
// Based upon https://github.com/gatsbyjs/gatsby/tree/master/examples/using-i18n
exports.onCreatePage = ({ page, actions }) => {
const { createRedirect, createPage, deletePage } = actions

// First delete the incoming page that was automatically created by Gatsby
// So everything in src/pages/
deletePage(page)
const BuildPage = (page, actions) => {
const { createRedirect, createPage } = actions
const is_responsible_trading = /responsible/g.test(page.path)
const is_contact_us = /contact_us/g.test(page.path)
const is_careers = /careers/g.test(page.path)
Expand Down Expand Up @@ -349,6 +346,48 @@ exports.onCreatePage = ({ page, actions }) => {
return current_page
})
}
exports.onCreatePage = ({ page, actions }) => {
const { deletePage } = actions
const isProduction = process.env.GATSBY_ENV === 'production'
const pagesToBuild = process.env.GATSBY_BUILD_PAGES || 'all'

// First delete the incoming page that was automatically created by Gatsby
// So everything in src/pages/
deletePage(page)

const pagesCategory = {
all: [''],
'no-affiliates': ['signup-affiliates', 'landing', 'ctrader', 'partners'],
'no-help-centre': ['help-centre'],
'no-tools': ['trader-tools'],
fast: [
'signup-affiliates',
'landing',
'ctrader',
'partners',
'help-centre',
'trader-tools',
'careers',
// 'markets',
// 'trade-types' Note: Feel free to adjust pages you want to skip building for faster local development
],
}

const disallowedPages = pagesCategory[pagesToBuild] || []

const regex = new RegExp(`/${disallowedPages.join('|') + '|'}/g`)

const isMatch = regex.test(page.path)

if (isProduction) {
return BuildPage(page, actions)
} else {
if (!isMatch || pagesToBuild === 'all') {
console.log(`\x1b[32mcreating\x1b[0m [${pagesToBuild}] ${page.path}`)
return BuildPage(page, actions)
}
}
}

const StylelintPlugin = require('stylelint-webpack-plugin')
const TerserPlugin = require('terser-webpack-plugin')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ import { TString } from 'types/generics'
import useSignupForm from 'features/hooks/use-signup-form'

const SignupPublicForm = () => {
const { onSignup, signUpForm } = useSignupForm()
const { onSignup, signUpForm } = useSignupForm({
form_name: 'virtual_signup_homepage_embedded',
})

const {
register,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react'
import { Analytics } from '@deriv/analytics'
import { public_signup_social_links } from './social.module.scss'
import Flex from 'features/components/atoms/flex-box'
import Button from 'features/components/atoms/button'
Expand Down Expand Up @@ -51,6 +52,12 @@ const social_button_content: SocialButtonContent[] = [

const PublicSignupSocial = () => {
const handleSocialSignup = (data_provider: TSocialProvider) => {
Analytics?.trackEvent('ce_virtual_signup_form', {
signup_provider: data_provider,
action: 'started',
form_source: document.referrer,
form_name: 'virtual_signup_homepage_embedded',
})
Login.initOneAll(data_provider)
}

Expand Down
8 changes: 6 additions & 2 deletions src/features/hooks/use-signup-form/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,14 @@ const schema = yup.object({

type FormData = yup.InferType<typeof schema>

const useSignupForm = () => {
type TSignupFormOptions = {
form_name?: 'default_diel_deriv' | 'virtual_signup_homepage_embedded'
}

const useSignupForm = (options?: TSignupFormOptions) => {
const analyticsData: Parameters<typeof Analytics.trackEvent>[1] = {
form_source: isBrowser() && window.location.hostname,
form_name: 'default_diel_deriv',
form_name: options?.form_name || 'default_diel_deriv',
}
const signUpForm = useForm<FormData>({
mode: 'onChange',
Expand Down
Binary file modified src/images/common/dbot/dbot-banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/images/common/dbot/dbot-build-strategy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/images/common/dbot/dbot-get-integrated-help.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/images/common/dbot/dbot-maximise-profits.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/images/common/dbot/dbot-save-your-strategies.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/images/common/dbot/dbot-strategy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/images/common/dbot/dbot-track-your-performance.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/images/common/dbot/step_image_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/images/common/dbot/step_image_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/images/common/dbot/step_image_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/images/common/dbot/step_image_4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/images/common/dbot/step_image_5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/pages/dbot/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ const items: TDNumbersItem[] = [
title: '_t_FREE_t_',
subtitle: '_t_zero cost to build_t_',
},
{ title: '3', subtitle: '_t_pre-built strategies included_t_' },
{ title: '6', subtitle: '_t_pre-built strategies included_t_' },
]

const trading: TradingType[] = [
{
title: '_t_Start with a popular strategy_t_',
subtitle:
"_t_Martingale, D'Alembert, and Oscar's Grind — load and customise proven strategies or create your own from scratch._t_",
"_t_Martingale, D'Alembert, Oscar's Grind, and more — load and customise proven strategies or create your own from scratch._t_",
image_name: 'dbot_strategy',
image_alt: '_t_Customise your DBot strategy_t_',
},
Expand Down
4 changes: 4 additions & 0 deletions src/pages/terms-and-conditions/_clients-grid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,10 @@ const columns: ColProps[] = [
url: '/tnc/deriv-(bvi)-ltd.pdf',
title: '_t_Deriv (BVI) Ltd_t_',
},
{
url: '/tnc/deriv-(v)-ltd.pdf',
title: '_t_Deriv (V) Ltd_t_',
},
],
},
]
Expand Down
Loading

0 comments on commit 99cb9e1

Please sign in to comment.