Skip to content

Commit

Permalink
fix: merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
aswathy-deriv committed Mar 12, 2024
2 parents ab1d30e + 3aff8bd commit 6bb03b8
Show file tree
Hide file tree
Showing 75 changed files with 6,734 additions and 5,851 deletions.
51 changes: 37 additions & 14 deletions crowdin/messages.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions deriv.com.conf
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ server {
}

location ~* "^/([\w]{2}|zh-tw|zh-cn)/contact-us" {
return 301 https://$http_host/$1/contact_us/;
return 301 https://$http_host/$1/contact-us/;
}

location /contact-us {
return 301 https://$http_host/contact_us/;
return 301 https://$http_host/contact-us/;
}

location ~* "^/([\w]{2}|zh-tw|zh-cn)/about" {
Expand Down
22 changes: 11 additions & 11 deletions gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ exports.onPreInit = () => {
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_contact_us = /contact-us/g.test(page.path)
const is_careers = /careers/g.test(page.path)
const is_p2p = /responsible/g.test(page.path)
const who_we_are = /who-we-are/g.test(page.path)
Expand Down Expand Up @@ -95,20 +95,20 @@ const BuildPage = (page, actions) => {

if (is_contact_us) {
createRedirect({
fromPath: `/contact-us/`,
toPath: `/contact_us/`,
fromPath: `/contact_us/`,
toPath: `/contact-us/`,
redirectInBrowser: true,
isPermanent: true,
})
createRedirect({
fromPath: `/contact/`,
toPath: `/contact_us/`,
toPath: `/contact-us/`,
redirectInBrowser: true,
isPermanent: true,
})
createRedirect({
fromPath: `/contact-us`,
toPath: `/contact_us/`,
fromPath: `/contact_us`,
toPath: `/contact-us/`,
redirectInBrowser: true,
isPermanent: true,
})
Expand Down Expand Up @@ -270,20 +270,20 @@ const BuildPage = (page, actions) => {

if (is_contact_us) {
createRedirect({
fromPath: `/${lang}/contact-us/`,
toPath: `/${lang}/contact_us/`,
fromPath: `/${lang}/contact_us/`,
toPath: `/${lang}/contact-us/`,
redirectInBrowser: true,
isPermanent: true,
})
createRedirect({
fromPath: `/${lang}/contact/`,
toPath: `/${lang}/contact_us/`,
toPath: `/${lang}/contact-us/`,
redirectInBrowser: true,
isPermanent: true,
})
createRedirect({
fromPath: `/${lang}/contact-us`,
toPath: `/${lang}/contact_us`,
fromPath: `/${lang}/contact_us`,
toPath: `/${lang}/contact-us`,
redirectInBrowser: true,
isPermanent: true,
})
Expand Down
32 changes: 16 additions & 16 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
"@artsy/fresnel": "^6.2.1",
"@builder.io/partytown": "^0.8.1",
"@deriv-com/analytics": "^1.4.11",
"@deriv-com/blocks": "^0.87.0",
"@deriv-com/components": "^0.52.0",
"@deriv-com/blocks": "^0.111.0",
"@deriv-com/components": "^0.57.0",
"@deriv-com/hooks": "^0.11.0",
"@deriv-com/providers": "^0.12.0",
"@deriv/deriv-api": "^1.0.13",
"@deriv/quill-design": "^1.2.16",
"@deriv/quill-icons": "^1.17.3",
"@deriv/quill-design": "^1.2.18",
"@deriv/quill-icons": "^1.19.2",
"@hookform/resolvers": "^3.3.2",
"@livechat/customer-sdk": "^3.1.5",
"@loadable/component": "^5.15.3",
Expand All @@ -24,6 +24,8 @@
"@svgr/webpack": "^8.1.0",
"@tanstack/react-table": "^8.10.7",
"@vercel/gatsby-plugin-vercel-builder": "^0.1.2",
"@zxcvbn-ts/core": "^3.0.4",
"@zxcvbn-ts/language-common": "^3.0.4",
"cli-select": "^1.1.2",
"clsx": "^1.2.1",
"commander": "^8.3.0",
Expand Down Expand Up @@ -81,9 +83,7 @@
"use-query-params": "^1.2.3",
"usehooks-ts": "^2.9.1",
"webpack": "^5.89.0",
"yup": "^1.3.2",
"@zxcvbn-ts/core": "^3.0.4",
"@zxcvbn-ts/language-common": "^3.0.4"
"yup": "^1.3.2"
},
"devDependencies": {
"@commitlint/cli": "^16.3.0",
Expand Down
2 changes: 1 addition & 1 deletion src/components/custom/other-platforms.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@ export const NavCompany = ({ onClick }: NavCompanyProps) => (
)}
title="_t_Contact us_t_"
onClick={onClick}
to="/contact_us/"
to="/contact-us/"
/>
<CardLink
Icon={() => <img src={Career} alt={localize('_t_careers_t_')} width="24" height="24" />}
Expand Down
2 changes: 1 addition & 1 deletion src/components/elements/off-canvas-menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ export const OffCanvasMenuWrapper = (props: OffCanvasMenuWrapperProps) => {
<Localize translate_text="_t_Why choose us_t_" />
</span>
</StyledLink>
<StyledLink to="/contact_us/" onClick={handleArrowClick}>
<StyledLink to="/contact-us/" onClick={handleArrowClick}>
<div>
<img
src={Contact}
Expand Down
2 changes: 1 addition & 1 deletion src/components/hooks/use-active-link-state.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const getNavigationMap = (type: string) => {
'regulatory',
'why-choose-us',
'partners',
'contact_us',
'contact-us',
'careers',
'who-we-are',
],
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
import React from 'react'
import { Hero } from '@deriv-com/blocks'
// eslint-disable-next-line import/no-unresolved
import { v4 as uuidv4 } from 'uuid'
import { Text, Heading, Button } from '@deriv/quill-design'
import { Localize } from 'components/localization'
import { TString } from 'types/generics'
import Label from 'features/components/atoms/label'
import useScrollToElement from 'features/hooks/use-scroll-to-element'
import TradersHubCtaButton from 'features/components/molecules/traders-hub-cta-button'
import { useFloatingCtaContext } from 'features/contexts/floating-cta/cta.provider'
import FloatingCta from 'features/pages/home/hero/floating-cta'

interface WhatAreDigitalOptionsProps {
heading: TString
description: TString
is_coming_soon: boolean
has_content_block: boolean
}

const WhatAreDigitalOptions = ({
heading,
description,
is_coming_soon,
has_content_block,
}: WhatAreDigitalOptionsProps) => {
const clickToScrollHandler = useScrollToElement('faqs', -100)
const uniq = `navbuttons_uniq_class_${uuidv4()}`
const { ctaBottom, visibilityPercentage, entryRef } = useFloatingCtaContext()

return (
<>
<Hero.ContentLess
className="px-800 md:px-1200 lg:px-gap-none"
description={
<Text className="leading-6">
<Localize translate_text={description} />
</Text>
}
title={
<Heading>
<Localize translate_text={heading} />
</Heading>
}
>
{is_coming_soon && (
<Label text="_t_Available on Demo accounts only_t_" bgcolor="blue" />
)}
{has_content_block && (
<div
className="flex flex-col items-center gap-400 md:!flex-row md:justify-center"
id={uniq}
>
<TradersHubCtaButton
ref={entryRef}
className="w-full md:!w-auto"
size="lg"
/>
<Button
size="lg"
variant="secondary"
colorStyle="black"
className="w-full md:!w-auto hover:!bg-solid-slate-50 sm:hover:!bg-opacity-black-100"
onClick={clickToScrollHandler}
>
<Localize translate_text="_t_Read FAQs_t_" />
</Button>
</div>
)}
</Hero.ContentLess>
{has_content_block && (
<FloatingCta
style={{
transform: `translateY(${visibilityPercentage - 100}%)`,
bottom: `${-68 + ctaBottom}px`,
}}
/>
)}
</>
)
}

export default WhatAreDigitalOptions
42 changes: 42 additions & 0 deletions src/features/components/quill/options-layout/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import React, { ReactNode } from 'react'
import MainRowNavigation from '../../templates/navigation/main-nav'
import Layout from '../quill-layout'
import MainFooter from 'features/components/templates/footer'
import { TString } from 'types/generics'
import OptionsTopTab from 'features/components/organisms/options-top-tab'
import WhatAreDigitalOptions from 'features/components/organisms/what-are-digital-options/accumulator'

interface OptionsLayoutProps {
children?: ReactNode
heading: TString
description: TString
is_coming_soon?: boolean
has_content_block?: boolean
}

const OptionsLayout = ({
heading,
description,
children,
is_coming_soon = false,
has_content_block = false,
}: OptionsLayoutProps) => {
return (
<>
<Layout>
<MainRowNavigation />
<OptionsTopTab />
<WhatAreDigitalOptions
heading={heading}
description={description}
is_coming_soon={is_coming_soon}
has_content_block={has_content_block}
/>
{children}
<MainFooter />
</Layout>
</>
)
}

export default OptionsLayout
37 changes: 35 additions & 2 deletions src/features/components/templates/footer/data.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const RowFooterNavData: FooterItems[] = [
},
{
id: 5,
href: '/contact_us',
href: '/contact-us',
text: <Localize translate_text="_t_Contact us_t_" />,
},
{ id: 6, href: '/careers', text: <Localize translate_text="_t_Careers_t_" /> },
Expand Down Expand Up @@ -302,7 +302,7 @@ export const EuFooterNavData: FooterItems[] = [
},
{
id: 5,
href: '/contact_us',
href: '/contact-us',
text: <Localize translate_text="_t_Contact us_t_" />,
},
{ id: 6, href: '/careers', text: <Localize translate_text="_t_Careers_t_" /> },
Expand Down Expand Up @@ -566,6 +566,39 @@ export const socialButtonsEU = [
},
]

export const socialButtonsCPA = [
{
icon: <StandaloneFacebookIcon iconSize="md" fill="#000000b8" />,
href: 'https://www.facebook.com/derivdotcom',
'data-cy': 'facebook',
'aria-label': 'facebook',
},
{
icon: <StandaloneInstagramIcon iconSize="md" fill="#000000b8" />,
href: 'https://www.instagram.com/deriv_official',
'data-cy': 'instagram',
'aria-label': 'instagram',
},
{
icon: <StandaloneXTwitterIcon iconSize="md" fill="#000000b8" />,
href: 'https://twitter.com/derivdotcom/',
'data-cy': 'twitter',
'aria-label': 'twitter',
},
{
icon: <StandaloneYoutubeIcon iconSize="md" fill="#000000b8" />,
href: 'https://www.youtube.com/@deriv',
'data-cy': 'youtube',
'aria-label': 'youtube',
},
{
icon: <StandaloneLinkedinIcon iconSize="md" fill="#000000b8" />,
href: 'https://www.linkedin.com/company/derivdotcom/',
'data-cy': 'linkedin',
'aria-label': 'linkedin',
},
]

export const socialButtonsCareers = [
{
icon: <StandaloneFacebookIcon iconSize="md" fill="#000000b8" />,
Expand Down
Loading

0 comments on commit 6bb03b8

Please sign in to comment.