Skip to content

Commit 78c29bb

Browse files
committed
chore: resolve merge conflicts
2 parents bc70551 + 8c7cee2 commit 78c29bb

File tree

36 files changed

+7111
-7633
lines changed

36 files changed

+7111
-7633
lines changed

.github/workflows/corewebvitals.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
DATADOG_APP_KEY: ${{ secrets.GATSBY_DATADOG_APPLICATION_ID }}
5454

5555
- name: Post audit comment
56-
uses: marocchino/sticky-pull-request-comment@v2
56+
uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31
5757
with:
5858
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5959
header: Core Web Vitals Audit

.github/workflows/generate-preview-link-eu.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
core.setOutput("comment", comment);
5050
5151
- name: Post Cloudflare Pages Preview comment
52-
uses: marocchino/sticky-pull-request-comment@efaaab3fd41a9c3de579aba759d2552635e590fd
52+
uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31
5353
with:
5454
header: Cloudflare Pages EU Preview Comment
5555
number: ${{github.event.pull_request.user.login}}
@@ -168,7 +168,7 @@ jobs:
168168
core.setOutput("comment", comment);
169169
- name: Post Cloudflare Pages Preview comment
170170
if: success() || failure()
171-
uses: marocchino/sticky-pull-request-comment@efaaab3fd41a9c3de579aba759d2552635e590fd
171+
uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31
172172
with:
173173
header: Cloudflare Pages Preview Comment
174174
number: ${{github.event.number}}

.github/workflows/generate-preview-link-row.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
core.setOutput("comment", comment);
5151
5252
- name: Post Cloudflare Pages Preview comment
53-
uses: marocchino/sticky-pull-request-comment@efaaab3fd41a9c3de579aba759d2552635e590fd
53+
uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31
5454
with:
5555
header: Cloudflare Pages ROW Preview Comment
5656
number: ${{github.event.pull_request.user.login}}
@@ -169,7 +169,7 @@ jobs:
169169
core.setOutput("comment", comment);
170170
- name: Post Cloudflare Pages Preview comment
171171
if: success() || failure()
172-
uses: marocchino/sticky-pull-request-comment@efaaab3fd41a9c3de579aba759d2552635e590fd
172+
uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31
173173
with:
174174
header: Cloudflare Pages Preview Comment
175175
number: ${{github.event.number}}

.github/workflows/generate-preview-link.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
core.setOutput("comment", comment);
4949
5050
- name: Post Cloudflare Pages Preview comment
51-
uses: marocchino/sticky-pull-request-comment@efaaab3fd41a9c3de579aba759d2552635e590fd
51+
uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31
5252
with:
5353
header: Cloudflare Pages Preview Comment
5454
number: ${{github.event.pull_request.user.login}}
@@ -176,7 +176,7 @@ jobs:
176176
core.setOutput("comment", comment);
177177
- name: Post Cloudflare Pages Preview comment
178178
if: success() || failure()
179-
uses: marocchino/sticky-pull-request-comment@efaaab3fd41a9c3de579aba759d2552635e590fd
179+
uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31
180180
with:
181181
header: Cloudflare Pages Preview Comment
182182
number: ${{github.event.number}}

.github/workflows/lighthouse.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
3838
- name: Add comment to PR
3939
id: loading_comment_to_pr
40-
uses: marocchino/sticky-pull-request-comment@v2
40+
uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31
4141
with:
4242
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4343
number: ${{ steps.pr_information.outputs.issue_number }}
@@ -98,7 +98,7 @@ jobs:
9898
9999
- name: Add comment to PR
100100
id: comment_to_pr
101-
uses: marocchino/sticky-pull-request-comment@v2
101+
uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31
102102
with:
103103
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
104104
number: ${{ github.event.issue.number }}

.github/workflows/smoketests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ jobs:
8787
8888
- name: Leave comment
8989
if: always() && contains(steps.pr_information.outputs.draft, 'false')
90-
uses: marocchino/sticky-pull-request-comment@v2
90+
uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31
9191
with:
9292
header: Smoke tests status update
9393
number: ${{ steps.pr_information.outputs.issue_number }}
+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { Analytics } from '@deriv-com/analytics'
2+
3+
const widgetEvent = (widget_name: 'trustpilot' | 'livechat' | 'whatsapp') => {
4+
Analytics.trackEvent('ce_widget_usage_form', {
5+
action: 'click',
6+
widget_name,
7+
})
8+
}
9+
10+
export default widgetEvent

src/components/hooks/use-social-media-url.tsx

-78
This file was deleted.

src/features/components/quill/layout-overlay/live-chat-button/index.tsx

+5-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import LiveChatHover from 'images/svg/layout/chat-hover.svg'
66
import useAuthCheck from 'components/hooks/use-auth-check'
77
import { getClientInformation, getDomain, getUTMData, isBrowser } from 'common/utility'
88
import useBreakpoints from 'components/hooks/use-breakpoints'
9+
import widgetEvent from 'common/tracking-functions/widget'
910

1011
const LiveChatButton = () => {
1112
const url_params = new URLSearchParams((isBrowser() && window.location.search) || '')
@@ -115,7 +116,10 @@ const LiveChatButton = () => {
115116
{is_livechat_interactive ? (
116117
<FloatingButton
117118
className="gtm-deriv-livechat"
118-
onClick={() => LC_API.current.open_chat_window()}
119+
onClick={() => {
120+
LC_API.current.open_chat_window()
121+
widgetEvent('livechat')
122+
}}
119123
>
120124
{(has_hover) => (
121125
<img

src/features/components/quill/layout-overlay/whats-app-button/index.tsx

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React from 'react'
22
import FloatingButton from '../floating-button'
33
import { whatsapp_url } from 'common/constants'
4+
import widgetEvent from 'common/tracking-functions/widget'
45
import WhatsAppIcon from 'images/svg/layout/normal.svg'
56
import WhatsAppHover from 'images/svg/layout/hover.svg'
67
import useBreakpoints from 'components/hooks/use-breakpoints'
@@ -9,7 +10,12 @@ const WhatsappButton = () => {
910
const { is_mobile } = useBreakpoints()
1011

1112
return (
12-
<FloatingButton onClick={() => window.open(whatsapp_url, '_blank')}>
13+
<FloatingButton
14+
onClick={() => {
15+
widgetEvent('whatsapp')
16+
window.open(whatsapp_url, '_blank')
17+
}}
18+
>
1319
{(has_hover) => (
1420
<img
1521
src={has_hover ? WhatsAppHover : WhatsAppIcon}

src/features/components/templates/footer/data.tsx

+28
Original file line numberDiff line numberDiff line change
@@ -619,3 +619,31 @@ export const socialButtonsCareers = [
619619
'aria-label': 'linkedin',
620620
},
621621
]
622+
623+
export const specialLanguageUrls = {
624+
ar: {
625+
instagram: 'https://www.instagram.com/deriv_ar/',
626+
twitter: 'https://twitter.com/DerivArabic',
627+
facebook: 'https://www.facebook.com/derivarabic',
628+
},
629+
fr: {
630+
instagram: 'https://www.instagram.com/deriv_french/',
631+
twitter: 'https://twitter.com/DerivFrench',
632+
facebook: 'https://www.facebook.com/FrenchDeriv/',
633+
},
634+
ru: {
635+
instagram: 'https://www.instagram.com/deriv_russian/',
636+
twitter: 'https://twitter.com/DerivRussian',
637+
facebook: 'https://www.facebook.com/RussianDeriv',
638+
},
639+
es: {
640+
instagram: 'https://www.instagram.com/deriv_espanol/',
641+
twitter: 'https://twitter.com/derivespanol',
642+
facebook: 'https://www.facebook.com/derivespanol',
643+
},
644+
pt: {
645+
instagram: 'https://www.instagram.com/deriv_portugues/',
646+
twitter: 'https://twitter.com/DerivPortugues',
647+
facebook: 'https://www.facebook.com/derivportugues',
648+
},
649+
}

src/features/components/templates/footer/index.tsx

+15-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import React, { useEffect, useState } from 'react'
2+
import Cookies from 'js-cookie'
23
import { Footer } from '@deriv-com/blocks'
34
import { qtJoin } from '@deriv/quill-design'
45
import {
@@ -8,6 +9,7 @@ import {
89
socialButtonsEU,
910
socialButtonsROW,
1011
socialButtonsCPA,
12+
specialLanguageUrls,
1113
warnText,
1214
} from './data'
1315
// import { socialIconROW, socialIconEU, socialIconCareer } from './validate-social-icons-data'
@@ -18,12 +20,22 @@ import useRegion from 'components/hooks/use-region'
1820
import { getLocationPathname } from 'common/utility'
1921
import useThirdPartyFlags from 'components/hooks/use-third-party-flags'
2022

23+
const overrideWithLang = (buttons, lang) =>
24+
buttons.map((button) =>
25+
lang in specialLanguageUrls
26+
? button['aria-label'] in specialLanguageUrls[lang]
27+
? { ...button, href: specialLanguageUrls[lang][button['aria-label']] }
28+
: button
29+
: button,
30+
)
31+
2132
export const MainFooter = () => {
22-
const { is_eu, is_cpa_plan } = useRegion()
2333
const [is_career, setIsCareer] = useState(false)
34+
const { is_eu, is_cpa_plan } = useRegion()
2435
const [social_buttons, setSocialButtons] = useState(socialButtonsROW)
2536
const [warn_text, setWarnText] = useState(warnText)
2637
const [nav_data, setNavData] = useState(RowFooterNavData)
38+
const lang = Cookies.get('user_language') || 'en'
2739

2840
useEffect(() => {
2941
const current_path = getLocationPathname()
@@ -48,7 +60,8 @@ export const MainFooter = () => {
4860
const socialIconCPA = filterSocialIcons(cpa_social_media_icons, socialButtonsCPA)
4961

5062
const region_buttons = is_eu ? socialIconEU : is_cpa_plan ? socialIconCPA : socialIconROW
51-
setSocialButtons(is_career ? socialIconCareer : region_buttons)
63+
const buttons = is_career ? socialIconCareer : region_buttons
64+
setSocialButtons(overrideWithLang(buttons, lang))
5265
if (is_eu) setNavData(EuFooterNavData)
5366
setWarnText(!is_eu && !is_cpa_plan ? warnText : null)
5467
}, [

src/features/hooks/use-signup-form/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ const useSignupForm = (options?: TSignupFormOptions) => {
5757

5858
const onSignup = ({ email }: FormData) => {
5959
Analytics?.trackEvent('ce_virtual_signup_form', {
60-
action: 'email_confirmation_sent',
60+
action: 'started',
6161
signup_provider: 'email',
6262
...analyticsData,
6363
})

src/features/pages/home/live-pricing-migration/cards/index.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ const LiveMarketCard = <T extends MarketName>({
113113
onClickBuyButton: is_logged_in
114114
? handleRedirectToTradersHub
115115
: () => {
116-
Analytics?.trackEvent('deriv_com_liveprice_cta', {
116+
Analytics?.trackEvent('ce_deriv_com_liveprice_cta', {
117117
action: 'click',
118118
button: 'buy',
119119
instrument: data[key].sym,
@@ -123,7 +123,7 @@ const LiveMarketCard = <T extends MarketName>({
123123
onClickSellButton: is_logged_in
124124
? handleRedirectToTradersHub
125125
: () => {
126-
Analytics?.trackEvent('deriv_com_liveprice_cta', {
126+
Analytics?.trackEvent('ce_deriv_com_liveprice_cta', {
127127
action: 'click',
128128
button: 'sell',
129129
instrument: data[key].sym,

0 commit comments

Comments
 (0)