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

Commit

Permalink
fix: resolve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
Agrim Jain authored and Agrim Jain committed Apr 30, 2024
2 parents 26455d7 + 8dd6aad commit 0043878
Show file tree
Hide file tree
Showing 38 changed files with 4,874 additions and 5,556 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/production-eu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
path: sites/eu/public
retention-days: 5
- name: Slack Notification 📣
uses: 8398a7/action-slack@v3
uses: 8398a7/action-slack@21dc5d142b92115d9c154540e48df504ad4e9cf9
with:
status: ${{ job.status }}
fields: workflow,repo
Expand Down Expand Up @@ -130,7 +130,7 @@ jobs:
./release.sh deriv-com ${{ github.ref_name }}
- name: Send Slack Notification on Docker Publish and Kubernetes Deployment Failure
uses: 8398a7/action-slack@v3
uses: 8398a7/action-slack@21dc5d142b92115d9c154540e48df504ad4e9cf9
with:
status: ${{ job.status }}
fields: workflow,repo
Expand All @@ -144,4 +144,4 @@ jobs:
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
if: failure()
if: failure()
6 changes: 3 additions & 3 deletions .github/workflows/production-row.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
path: sites/row/public
retention-days: 5
- name: Slack Notification 📣
uses: 8398a7/action-slack@v3
uses: 8398a7/action-slack@21dc5d142b92115d9c154540e48df504ad4e9cf9
with:
status: ${{ job.status }}
fields: workflow,repo
Expand Down Expand Up @@ -131,7 +131,7 @@ jobs:
./release.sh deriv-com ${{ github.ref_name }}
- name: Send Slack Notification on Docker Publish and Kubernetes Deployment Failure
uses: 8398a7/action-slack@v3
uses: 8398a7/action-slack@21dc5d142b92115d9c154540e48df504ad4e9cf9
with:
status: ${{ job.status }}
fields: workflow,repo
Expand All @@ -145,4 +145,4 @@ jobs:
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
if: failure()
if: failure()
2 changes: 1 addition & 1 deletion .github/workflows/smoketests-eu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
- name: Cypress run
# Uses the official Cypress GitHub action https://github.com/cypress-io/github-action
if: "contains(steps.pr_information.outputs.draft, 'false')"
uses: cypress-io/github-action@v6
uses: cypress-io/github-action@97d526c9027e1b1eedde4f37196aebe8834005ef
with:
# Records to Cypress Cloud
# https://docs.cypress.io/guides/cloud/projects#Set-up-a-project-to-record
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/smoketests-row.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
- name: Cypress run
# Uses the official Cypress GitHub action https://github.com/cypress-io/github-action
if: "contains(steps.pr_information.outputs.draft, 'false')"
uses: cypress-io/github-action@v6
uses: cypress-io/github-action@97d526c9027e1b1eedde4f37196aebe8834005ef
with:
# Records to Cypress Cloud
# https://docs.cypress.io/guides/cloud/projects#Set-up-a-project-to-record
Expand Down
4 changes: 3 additions & 1 deletion crowdin/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,6 @@
"590149919": "Ensure that you make payment to the correct seller within 1 hour.",
"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",
Expand Down Expand Up @@ -1412,6 +1411,7 @@
"1370655673": "Affiliate and IB programmes | Partnership programmes | Deriv",
"1371193412": "Cancel",
"1372981277": "Responsive platforms",
"1373549717": "Jump Indices",
"1374586234": "Grow your potential payout at every tick with accumulator options. Accumulator trading is available on volatility indices under derived indices.",
"1375342464": "Deriv MT5 signals",
"1376119698": "Why does the \"Matches\" contract have a higher predicted payout compared to \"Differs\"?",
Expand Down Expand Up @@ -1952,6 +1952,7 @@
"1842977728": "Use public wifi.",
"1844394355": "5. If you're adding your first Deriv X account, you'll need to set your Deriv X password. If you've already set your Deriv X password, you'll need to enter it now.",
"1845394200": "At Deriv, we enforce best-in-class security measures such as SSL encryption to protect your account and personal data.",
"1846038205": "These indices correspond to simulated markets with <0>constant volatilities of 50%, 75%, and 100%.</0> There is an equal probability of an up or down jump <0>every 20 minutes,</0> on average. The jump size is <0> around 30 times </0>the normal price movement, on average.",
"1846521577": "Is the Deriv Payment Agent Programme the same as Deriv P2P (DP2P)?",
"1846664697": "Use the chat feature in Deriv P2P to communicate with the trader you're dealing with.",
"1848198099": "<0>With an equivalent $100 position on CFDs</0>, with 1:500 leverage, you risk 2% * $50,000 = <1>$1,000 loss</1>.",
Expand Down Expand Up @@ -2156,6 +2157,7 @@
"2015114251": "What is the minimum / maximum I can deposit into my Deriv X account?",
"2017988148": "download on the app store",
"2018198484": "Trading cryptocurrencies gives you the chance to earn profits from price movements without owning the underlying digital coins. In other words, you can earn by correctly predicting whether the price of a cryptocurrency will go up or down.",
"2019140039": "Why trade basket indices on Deriv",
"2019968401": "Why trade with Deriv X",
"2023310659": "Currencies",
"2023444069": "Swap-free",
Expand Down
14 changes: 9 additions & 5 deletions themes/gatsby-theme-deriv/src/common/os-detect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,18 @@ export const mobileOSDetect = () => {
return 'Windows Phone'
}

if (/android/i.test(userAgent)) {
return 'Android'
}

// iOS detection from: http://stackoverflow.com/a/9039885/177710
if (/iPad|iPhone|iPod/.test(userAgent) && !window.MSStream) {
if (/iPad|iPhone|iPod|Mac/.test(userAgent) && !window.MSStream) {
return 'iOS'
}

if (/android/i.test(userAgent)) {
if (/huawei/i.test(userAgent)) {
return 'Huawei'
} else {
return 'Android'
}
}

return 'unknown'
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import React, { PropsWithChildren } from 'react'
import { useStaticQuery, graphql, Script } from 'gatsby'
import { localize } from '../localization'
import language_config from '../../../i18n-config'
import TradingImage from 'images/common/origderiv.jpg'
import { isBrowser } from 'common/utility'
import { eu_urls } from 'common/constants'
import TradingImage from 'images/common/og_deriv.jpg'
import { TString } from 'types/generics'
import { TPageContext } from 'features/types'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ const MultiWidthColumn = ({
mobilePadding={mobilePadding}
tabletPositionBackgroundImage={tabletPositionBackgroundImage}
mobilePositionBackgroundImage={mobilePositionBackgroundImage}
id="target-component"
>
<StyledContainerBox ai="stretch" justify="flex-start" tablet_direction="column">
<FirstColumn
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
79 changes: 56 additions & 23 deletions themes/gatsby-theme-deriv/src/pages/deriv-go/_banner.tsx
Original file line number Diff line number Diff line change
@@ -1,30 +1,36 @@
import React from 'react'
import styled from 'styled-components'
import { StaticImage } from 'gatsby-plugin-image'
import {StyledHeaderForPlatform} from 'components/elements/common-header-section'
import { StyledHeaderForPlatform } from 'components/elements/common-header-section'
import DerivGOLogo from 'images/svg/deriv-go/deriv-go-banner-logo.svg'
import device from 'themes/device'
import useHandleSignup from 'components/hooks/use-handle-signup'
import useAuthCheck from 'components/hooks/use-auth-check'
import { handleGetTrading } from 'components/custom/utils'
import useBreakpoints from 'components/hooks/use-breakpoints'
import Shape from 'components/custom/_hero-shape'
import Button from 'components/custom/_button'
import { useIsRtl } from 'components/hooks/use-isrtl'
import { Container } from 'components/containers'
import { breakpoints } from 'themes/theme.breakpoints'
import { mobileOSDetect } from 'common/os-detect'
import {
deriv_go_huaweiappgallery_url,
deriv_go_ios_url,
deriv_go_playstore_url,
} from 'common/constants'

//TODO: (deriv-rebranding) to make the content section reusable .

const ImageWrapper = styled.div`
flex: 1;
justify-content: center;
&.mobile-img{
&.mobile-img {
display: none;
@media ${device.tablet} {
display: flex;
}
}
&.tablet-img{
&.tablet-img {
display: none;
@media ${breakpoints.sm} {
display: flex;
Expand All @@ -33,9 +39,9 @@ const ImageWrapper = styled.div`
display: flex;
}
}
&.desktop-img{
&.desktop-img {
display: none;
@media screen and (min-width: 1201px ) {
@media screen and (min-width: 1201px) {
display: flex;
}
}
Expand Down Expand Up @@ -129,6 +135,36 @@ const DHero = () => {
const handleSignup = useHandleSignup()
const [is_logged_in] = useAuthCheck()
const is_rtl = useIsRtl()
const { is_mobile } = useBreakpoints()

const handleGetTradingDesktop = () => {
const targetComponent = document.getElementById('target-component')
if (targetComponent) {
targetComponent.scrollIntoView({ behavior: 'smooth', block: 'center' })
}
}

const handleGetTradingMobile = () => {
const os = mobileOSDetect()

switch (os) {
case 'Android':
window.open('https://play.google.com/store/apps/details?id=com.deriv.app', '_blank')
window.open(deriv_go_playstore_url, '_blank')
break
case 'iOS':
window.open(
'https://apps.apple.com/my/app/deriv-go-online-trading-app/id1550561298',
'_blank',
)
window.open(deriv_go_ios_url, '_blank')

break
case 'Huawei':
window.open('https://appgallery.huawei.com/app/C103801913', '_blank')
window.open(deriv_go_huaweiappgallery_url, '_blank')
}
}

return (
<BackgroundStyle>
Expand All @@ -138,7 +174,7 @@ const DHero = () => {
<StyledTradingLogin src={DerivGOLogo} alt="Deriv Go" />
<StyledHeaderForPlatform
title="_t_A trading platform for on-the-go traders_t_"
title_font_size='64px'
title_font_size="64px"
font_family_title={
is_rtl ? 'Noto Sans, sans-serif' : 'Ubuntu, sans-serif'
}
Expand All @@ -148,7 +184,9 @@ const DHero = () => {
<BannerButtonWrapper>
{is_logged_in ? (
<CreateAccountButton
onClick={handleGetTrading}
onClick={
is_mobile ? handleGetTradingMobile : handleGetTradingDesktop
}
label="_t_Get Trading_t_"
primary
mobileFullWidth
Expand All @@ -165,21 +203,16 @@ const DHero = () => {
</Content>
</ContentWrapperStyle>
<HeroImageWrapper>
<Shape
angle={163}
angle_mobile={101}
width={'60%'}
width_tablet='55%'
>
<ImageWrapper className='mobile-img'>
<StaticImage
src="../../images/common/deriv-go/deriv-go-mobile.png"
loading="eager"
formats={['avif', 'webp', 'auto']}
alt="banner"
/>
<Shape angle={163} angle_mobile={101} width={'60%'} width_tablet="55%">
<ImageWrapper className="mobile-img">
<StaticImage
src="../../images/common/deriv-go/deriv-go-mobile.png"
loading="eager"
formats={['avif', 'webp', 'auto']}
alt="banner"
/>
</ImageWrapper>
<ImageWrapper className='tablet-img'>
<ImageWrapper className="tablet-img">
<StaticImage
src="../../images/common/deriv-go/banner_image_tablet.png"
loading="eager"
Expand All @@ -188,7 +221,7 @@ const DHero = () => {
imgStyle={{ objectFit: 'contain' }}
/>
</ImageWrapper>
<ImageWrapper className='desktop-img'>
<ImageWrapper className="desktop-img">
<StaticImage
src="../../images/common/deriv-go/banner_image.png"
loading="eager"
Expand Down
41 changes: 35 additions & 6 deletions themes/gatsby-theme-deriv/src/pages/derivx/_hero.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'
import styled from 'styled-components'
import { StaticImage } from 'gatsby-plugin-image'
import {StyledHeaderForDerivxHero} from 'components/elements/common-header-section'
import { StyledHeaderForDerivxHero } from 'components/elements/common-header-section'
import { DerivXBannerLogo } from 'images/svg/deriv-x'
import device from 'themes/device'
import useHandleSignup from 'components/hooks/use-handle-signup'
Expand All @@ -11,6 +11,12 @@ import Shape from 'components/custom/_hero-shape'
import { useIsRtl } from 'components/hooks/use-isrtl'
import Button from 'components/custom/_button'
import { Container } from 'components/containers'
import { mobileOSDetect } from 'common/os-detect'
import {
deriv_go_huaweiappgallery_url,
deriv_go_ios_url,
deriv_go_playstore_url,
} from 'common/constants'
import { localize } from 'components/localization'

//TODO: (deriv-rebranding) to make the content section reusable .
Expand All @@ -23,13 +29,13 @@ const ImageStyle = styled.div`
@media ${device.tablet} {
width: 100%;
}
&.mobile-img{
&.mobile-img {
display: none;
@media ${device.tablet} {
display: block;
}
}
&.desktop-img{
&.desktop-img {
display: block;
@media ${device.tablet} {
display: none;
Expand Down Expand Up @@ -138,6 +144,29 @@ const DCommonBanner = () => {
const [is_logged_in] = useAuthCheck()
const is_rtl = useIsRtl()

const handleGetTradingDesktop = () => {
const targetComponent = document.getElementById('target-component')
if (targetComponent) {
targetComponent.scrollIntoView({ behavior: 'smooth', block: 'center' })
}
}

const handleGetTradingMobile = () => {
const os = mobileOSDetect()

switch (os) {
case 'Android':
window.open(deriv_go_playstore_url, '_blank')
break
case 'iOS':
window.open(deriv_go_ios_url, '_blank')
break
case 'Huawei':
window.open(deriv_go_huaweiappgallery_url, '_blank')
break
}
}

return (
<BackgroundStyle>
<StyledContainer jc="flex-start">
Expand All @@ -149,7 +178,7 @@ const DCommonBanner = () => {
/>
<StyledHeaderForDerivxHero
title="_t_The trading platform to fit your style_t_"
title_font_size='64px'
title_font_size="64px"
font_family_title={
is_rtl ? 'Noto Sans, sans-serif' : 'Ubuntu, sans-serif'
}
Expand Down Expand Up @@ -179,15 +208,15 @@ const DCommonBanner = () => {
<HeroImageWrapper>
<Shape angle={168} angle_mobile={101} width="55%">
<ImageWrapper>
<ImageStyle className='mobile-img'>
<ImageStyle className="mobile-img">
<StaticImage
src="../../images/common/deriv-x/banner_image_derivx_mobile.png"
loading="eager"
formats={['avif', 'webp', 'auto']}
alt="Banner"
/>
</ImageStyle>
<ImageStyle className='desktop-img'>
<ImageStyle className="desktop-img">
<StaticImage
src="../../images/common/deriv-x/banner_image_derivx.png"
loading="eager"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const BasketIndices = ({ simple_step_content }: BasketIndicesProps) => {
<Localize translate_text="_t_Check trading specs_t_" />
</LinkButton.Primary>
</Flex.Box>
<FullWidthMultiColumn header="_t_Why trade baskets on Deriv_t_">
<FullWidthMultiColumn header="_t_Why trade basket indices on Deriv_t_">
{(region === 'row' ? basket_indices_content : basket_indices_content_eu).map(
({ alt, src, text }) => (
<StyledBox
Expand Down
Loading

0 comments on commit 0043878

Please sign in to comment.