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' into pr-4212-tnc-pdf
Browse files Browse the repository at this point in the history
  • Loading branch information
agrim-deriv committed Jul 17, 2024
2 parents 9e1de9b + 54b1981 commit 62dc0fc
Show file tree
Hide file tree
Showing 27 changed files with 209 additions and 1,053 deletions.
9 changes: 4 additions & 5 deletions crowdin/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
"33727397": "You can fund your margin account with EUR, USD and GBP. If you wish to use other currencies, please reach out to us and we will review your request.",
"34997376": "Deriv in numbers",
"36380780": "<p>Here's how to open a Touch/No Touch contract:</p><ul><li>Choose an instrument to trade.</li><li>Set the duration of your contract.</li><li>Set your preferred barrier.</li><li>Enter your stake or desired potential payout.</li><li>Place your trade.</li></ul>",
"36614989": "To register a complaint and seek assistance, follow these easy steps",
"39595561": "See how your bot is performing as it executes each trade and receive notifications via Telegram.",
"41078219": "Get into the Deriv Trader experience",
"41570825": "Are High/Low Ticks options available on Deriv Trader?",
Expand Down Expand Up @@ -708,6 +707,7 @@
"686707119": "Are In/Out options available on Deriv Trader?",
"686961748": "<0>Deriv Trader</0> is an advanced trading platform where you can trade digital and lookback options and multipliers on more than 50 assets.",
"688617121": "High leverage",
"688625639": "We will acknowledge receipt of your complaint via email and aim to provide a final response within fifteen (15) business days.",
"689068852": "Where can I see my ads?",
"689400450": "It's the best broker in the world. I will recommend it to anyone every day all the time. Their support agents are really helpful in all areas.",
"690959930": "Reset password | Deriv",
Expand Down Expand Up @@ -936,7 +936,6 @@
"897072394": "deriv.app platform video",
"897325464": "Instruments available for CFD trading",
"898646134": "To see your account’s trading limits, go to Settings > Security and safety > <0>Account limits</0>.",
"899411431": "Once you’re shown options to select from, choose “Complaints”. You can also type \"complaint\".",
"899612897": "You should enter 8-13 numbers.",
"901158881": "This feature allows you to set the level of profit that you are comfortable with when the market moves in your favour. Once the amount is reached, your position will be closed automatically and your earnings will be deposited into your Deriv account.",
"902057285": "Click Yes to confirm the cancellation. Your funds will be returned to your Deriv account, and your account balance will be updated accordingly.",
Expand Down Expand Up @@ -1451,7 +1450,6 @@
"1403761038": "Real account ",
"1403848854": "The Deriv MT5 Standard account offers new and experienced traders high leverage and variable spreads for maximum flexibility.",
"1404594106": "Swap short (Daily points)",
"1405194573": "Locate the live chat widget on our website or app at the bottom right corner of the screen.",
"1405929527": "Your IB commissions earned from Deriv X are credited directly into your Deriv account daily.",
"1406209174": "Trade with a regulated industry pioneer trusted by traders for more than 20 years.",
"1406360927": "Minor pairs",
Expand Down Expand Up @@ -2183,6 +2181,7 @@
"2036876215": "<0>Forex at your fingertips.</0> Currency trading with major, minor, and exotic pairs. ",
"2041571225": "- Brokerage firms",
"2041763181": "Once we've paid your commission into your account, you can withdraw whenever you want.",
"2043149338": "To register a complaint about our Services, follow these easy steps:",
"2043507434": "Here's what you can do:",
"2044508368": "Earn when your clients trade on an MT5 Financial STP account.<br><br>All commission rates are quoted in USD, per round trade.",
"2044967354": "You can see your available balance in the <0>My profile</0> tab.",
Expand Down Expand Up @@ -2708,8 +2707,8 @@
"-801786755": "How to change affiliate links.",
"-284709654": "Complaints",
"-777070551": "How can I submit a complaint?",
"-1435532406": "Click the widget to open the chat window.",
"-1071683620": "Respond to the questions that appear on your screen.",
"-660822390": "Compose an email detailing your complaint and attach any supporting evidence.",
"-1193532945": "Send the email to <0>[email protected]</0>.",
"-151972777": "No. Regulators will not accept your complaint unless you first give us a chance to investigate your complaint and give you a response within the timeframes specified in our <0>complaints policy.</0>",
"-280324365": "What is Deriv Bot?",
"-1787820992": "Platforms",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useEffect, useState } from 'react'
import Cookies from 'js-cookie'
import { Footer } from '@deriv-com/blocks'
import { qtJoin } from '@deriv/quill-design'
import { qtJoin, Text } from '@deriv/quill-design'
import {
EuFooterNavData,
RowFooterNavData,
Expand All @@ -15,10 +15,12 @@ import {
import { DerivGoBanner } from './deriv-go-banner'
import { IIPAward } from './iip-award'
import { DescriptionContent } from './description'
import { usePageLoaded } from 'components/hooks/use-page-loaded'
import useThirdPartyFlags from 'components/hooks/use-third-party-flags'
import { getLocationPathname } from 'common/utility'
import useRegion from 'components/hooks/use-region'
import useBuildVariant from 'features/hooks/use-build-variant'
import { Localize } from 'components/localization'
// import { socialIconROW, socialIconEU, socialIconCareer } from './validate-social-icons-data'

const overrideWithLang = (buttons, lang) =>
Expand Down Expand Up @@ -60,10 +62,10 @@ export const MainFooter = () => {
const socialIconCareer = filterSocialIcons(career_social_media_icons, socialButtonsCareers)
const socialIconCPA = filterSocialIcons(cpa_social_media_icons, socialButtonsCPA)

const region_buttons = region === "eu" ? socialIconEU : is_cpa_plan ? socialIconCPA : socialIconROW
const region_buttons = region === 'eu' ? socialIconEU : is_cpa_plan ? socialIconCPA : socialIconROW
const buttons = is_career ? socialIconCareer : region_buttons
setSocialButtons(overrideWithLang(buttons, lang))
setWarnText(region !== "eu" && !is_cpa_plan ? warnText : null)
setWarnText(region !== 'eu' && !is_cpa_plan ? warnText : null)
}, [
lang,
region,
Expand All @@ -75,16 +77,25 @@ export const MainFooter = () => {
cpa_social_media_icons,
])

const[is_mounted] = usePageLoaded();
if(!is_mounted) return null

return (
<Footer.FooterBlock
warningText={warn_text}
warningText={warn_text && (
<Text className={`text-solid-slate-600 ${region !== 'eu' && !is_cpa_plan ? 'additional-warning-classname' : ''}`} size="sm">
<Localize
translate_text={warn_text}
/>
</Text>
)}
socialButtons={social_buttons}
banner={DerivGoBanner}
awards={IIPAward}
descriptionContent={DescriptionContent}
className={qtJoin((region === "eu" || is_cpa_plan) && 'mb-[120px] lg:mb-[80px]')}
className={qtJoin((region === 'eu' || is_cpa_plan) && 'mb-[120px] lg:mb-[80px]')}
>
<Footer.MainNavContent items={region === "eu" ? EuFooterNavData : RowFooterNavData} cols="six" />
<Footer.MainNavContent items={region === 'eu' ? EuFooterNavData : RowFooterNavData} cols='six' />
</Footer.FooterBlock>
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { useForm } from 'react-hook-form'
import { navigate } from 'gatsby'
import { getCookiesFields, getCookiesObject, getDataObjFromCookies } from 'common/cookies'
import { validation_regex } from 'common/validation'
import apiManager from 'common/websocket'
import apiManager, { ApiManager } from 'common/websocket'
import { getLanguage, isBrowser } from 'common/utility'

const getVerifyEmailRequest = (formatted_email: string) => {
Expand Down Expand Up @@ -58,13 +58,24 @@ const useSignupForm = (options?: TSignupFormOptions) => {
resolver: yupResolver(schema),
})

const onSignup = ({ email }: FormData) => {
const onSignup = async ({ email }: FormData) => {
Analytics?.trackEvent('ce_virtual_signup_form', {
action: 'started',
signup_provider: 'email',
...analyticsData,
})

const readyState = parseInt(ApiManager.readyState)
if (readyState !== 1 && readyState !== 0) {
if (isBrowser()) {
const currentLanguage = getLanguage() ?? 'en'
try {
// Connect to WebSocket if not connected
await apiManager.reconnectIfNotConnected(currentLanguage)
} catch (e) {
console.log(e)
}
}
}
const formatted_email = getVerifyEmailRequest(email)
apiManager
.augmentedSend('verify_email', {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ const DtraderEasySteps = () => {
renderFooter={() => (
<GotoLiveWrapper>
<GoToLiveDemo
tertiary
secondary
external
to={`https://app.deriv.com/dtrader?lang=${getLanguage()}`}
target="_blank"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const complaints_procedure: TQuestionsData = {
answer: [
{
translation_text:
'_t_To register a complaint and seek assistance, follow these easy steps_t_',
'_t_To register a complaint about our Services, follow these easy steps:_t_',
},

{
Expand All @@ -36,18 +36,17 @@ const complaints_procedure: TQuestionsData = {
items: [
{
translation_text:
'_t_Locate the live chat widget on our website or app at the bottom right corner of the screen._t_',
'_t_Compose an email detailing your complaint and attach any supporting evidence._t_',
},
{
translation_text: '_t_Click the widget to open the chat window._t_',
translation_text: '_t_Send the email to <0>[email protected]</0>._t_',
translation_components: [
{ key: 0, type: 'strong' },
],
},
{
translation_text:
'_t_Once you’re shown options to select from, choose “Complaints”. You can also type "complaint"._t_',
},
{
translation_text:
'_t_Respond to the questions that appear on your screen._t_',
'_t_We will acknowledge receipt of your complaint via email and aim to provide a final response within fifteen (15) business days._t_',
},
],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,26 +62,31 @@ const PartnersGuidePdf = () => {
}

const BusinessGrid = () => {
// const general_terms_url = `/tnc/business-partners-general-terms-es.pdf`
// const affiliate_brokers_url = `/tnc/business-partners-affiliates-and-introducing-brokers-es.pdf`
// const payment_agents_url = `/tnc/business-partners-payment-agents-es.pdf`
// const api_user_url = `/tnc/business-partners-api-user-es.pdf`
// const bug_bounty_url = `/tnc/business-partners-bug-bounty-es.pdf`
const { region } = useBuildVariant()
// const language = getLanguage()

const general_terms_url_region = region === "row"
? '/tnc/business-partners-general-terms.pdf'
: '/tnc/business-partners-general-terms-eu.pdf'
const affiliate_brokers_url_region = region === "row"
? '/tnc/business-partners-affiliates-and-introducing-brokers-row.pdf'
: '/tnc/business-partners-affiliates-and-introducing-brokers-eu.pdf'
const api_user_url_region = region === "row"
? '/tnc/business-partners-api-user.pdf'
: '/tnc/business-partners-api-user-eu.pdf'
const bug_bounty_url_region = region === "row"
? '/tnc/business-partners-bug-bounty.pdf'
: '/tnc/business-partners-bug-bounty-eu.pdf'

const { region } = useBuildVariant();
const language = getLanguage();

let general_terms_url_region, affiliate_brokers_url_region, api_user_url_region, bug_bounty_url_region;

if (language === "es") {
general_terms_url_region = '/tnc/business-partners-general-terms-es.pdf';
affiliate_brokers_url_region = '/tnc/business-partners-affiliates-and-introducing-brokers-es.pdf';
api_user_url_region = '/tnc/business-partners-api-user-es.pdf';
bug_bounty_url_region = '/tnc/business-partners-bug-bounty-es.pdf';
} else {
general_terms_url_region = region === "row"
? '/tnc/business-partners-general-terms.pdf'
: '/tnc/business-partners-general-terms-eu.pdf';
affiliate_brokers_url_region = region === "row"
? '/tnc/business-partners-affiliates-and-introducing-brokers-row.pdf'
: '/tnc/business-partners-affiliates-and-introducing-brokers-eu.pdf';
api_user_url_region = region === "row"
? '/tnc/business-partners-api-user.pdf'
: '/tnc/business-partners-api-user-eu.pdf';
bug_bounty_url_region = region === "row"
? '/tnc/business-partners-bug-bounty.pdf'
: '/tnc/business-partners-bug-bounty-eu.pdf';
}

return (
<StyledContainer>
Expand Down
Loading

0 comments on commit 62dc0fc

Please sign in to comment.