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

Commit

Permalink
Pr 00 fix build issue (#7294)
Browse files Browse the repository at this point in the history
* chore: fixed build issues

* chore: fixed build issues
  • Loading branch information
hasan-deriv authored Mar 12, 2024
1 parent 05b6155 commit d8948b6
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 49 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
@use 'features/styles/theme/theme-mixins' as *;

.static_nav_logo {
inline-size: 19.9rem;
block-size: 3.19rem;

@include breakpoints(tablet) {
inline-size: 19.9rem;
block-size: 3.19rem;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import React from 'react'
import NavTemplate from '../template'
import { static_nav_logo } from './academy-nav.module.scss'
import LogoImage from 'images/common/academy.svg'
import Link from 'features/components/atoms/link'
import Image from 'features/components/atoms/image'

const AcademyNav = () => {
return (
<NavTemplate
has_centered_items
has_centered_logo
renderLogo={() => (
<Link url={{ type: 'internal', to: '/' }}>
<Image src={LogoImage} className={static_nav_logo} />
</Link>
)}
/>
)
}

export default AcademyNav
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ import SignUpFormContainer from './form-container'
import AcademyNav from 'features/components/templates/navigation/academy-nav'
import Flex from 'features/components/atoms/flex-box'
import { isBrowser } from 'common/utility'
import { BuildVariantType } from 'features/types'

const SignUpAcademy = () => {
const SignUpAcademy = ({region}: BuildVariantType) => {
const analyticsData: Parameters<typeof Analytics.trackEvent>[1] = {
form_source: isBrowser() && window.location.hostname,
form_name: 'default_diel_deriv',
Expand All @@ -19,7 +20,7 @@ const SignUpAcademy = () => {
}, [])

return (
<Layout>
<Layout region={region}>
<AcademyNav />

<Flex.Box
Expand Down
5 changes: 3 additions & 2 deletions themes/gatsby-theme-deriv/src/pages/academy-signup/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ import { TGatsbyHead } from 'features/types'
import { WithIntl } from 'components/localization'
import { SEO } from 'components/containers'

const SignupPage = () => {
return <SignUpAcademy />
const SignupPage = ({ pageContext }: TGatsbyHead) => {
const { region } = pageContext
return <SignUpAcademy region={region}/>
}

export default WithIntl()(SignupPage)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ import {
deriv_go_ios_url,
} from 'common/constants'
import DownloadColumn, { TDownloadColumnItem } from 'components/custom/_multi-width-column-download'
<<<<<<< HEAD:themes/gatsby-theme-deriv/src/pages/deriv-go/_footer-banner.tsx
=======
import { localize } from 'components/localization'
>>>>>>> master:src/pages/deriv-go/_footer-banner.tsx
import useThirdPartyFlags from 'components/hooks/use-third-party-flags'

const ContentWrapper = styled.div<{ is_rtl: boolean }>`
Expand Down
29 changes: 0 additions & 29 deletions themes/gatsby-theme-deriv/src/pages/deriv-go/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ const derivGoPortalData: TPortal = {
link: 'https://portal.productboard.com/gfueayjjwpmfhdysrrn3n3wn',
}

<<<<<<< HEAD:themes/gatsby-theme-deriv/src/pages/deriv-go/index.tsx
const DerivGo = ({ pageContext }: TGatsbyHead) => {
const { region } = pageContext
const deriv_go_management_board = useThirdPartyFlags('deriv_go_management_board')
Expand All @@ -69,34 +68,6 @@ const DerivGo = ({ pageContext }: TGatsbyHead) => {
<OtherApps />
</Layout>
)
=======
const DerivGo = () => {
const { is_row } = useRegion()
const [is_loaded, setLoaded] = useState(false)
const deriv_go_management_board = useThirdPartyFlags('deriv_go_management_board')

useEffect(() => {
setLoaded(true)
}, [])

if (is_loaded) {
if (is_row) {
return (
<Layout>
<Banner />
<WhatIsDerivGo />
<WhyTradeDerivGo />
<DerivGoContent reverse P2P={items} />
<StartDerivGo />
{deriv_go_management_board && <Roadmap portal={derivGoPortalData} />}
<FooterBanner />
<OtherApps />
</Layout>
)
}

return <PageNotFound />
>>>>>>> master:src/pages/deriv-go/index.tsx
}

return <PageNotFound region={region} />
Expand Down
4 changes: 0 additions & 4 deletions themes/gatsby-theme-deriv/src/pages/derivx/_other-apps.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
import React from 'react'
<<<<<<< HEAD:themes/gatsby-theme-deriv/src/pages/derivx/_other-apps.tsx
import { MT5Icon, DTIcon, DGoIcon, DBIcon } from '../../images/svg/deriv-x'
=======
import { MT5Icon, DTIcon, EZIcon, DGoIcon, DBIcon } from '../../images/svg/deriv-x'
import ctIcon from '../../images/svg/ctrader/light-ctrader-logo.svg'
>>>>>>> master:src/pages/derivx/_other-apps.tsx
import GenericCarousel, { TRenderableData } from 'components/custom/carousel/_platforms-carousel'

const carouselData: TRenderableData[] = [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
import React from 'react'
import mt5Icon from '../../images/svg/dtrader/mt5.svg'
import goIcon from '../../images/svg/custom/rebranding/deriv-go-icon.svg'
<<<<<<< HEAD:themes/gatsby-theme-deriv/src/pages/dtrader/_our-platforms.tsx
=======
import ctIcon from '../../images/svg/ctrader/light-ctrader-logo.svg'
import ezIcon from '../../images/svg/dtrader/ez-icon.svg'
>>>>>>> master:src/pages/dtrader/_our-platforms.tsx
import dxIcon from '../../images/svg/custom/rebranding/deriv-x-icon.svg'
import dbIcon from '../../images/svg/dtrader/db-icon.svg'
import GenericCarousel, { TRenderableData } from 'components/custom/carousel/_platforms-carousel'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,8 @@ const BusinessGrid = () => {
const payment_agents_url = `/tnc/[ES]_business-partners-payment-agents-R23_12_1.pdf`
const api_user_url = `/tnc/[ES]_business-partners-api-user-R23_12_1.pdf`
const bug_bounty_url = `/tnc/[ES]_business-partners-bug-bounty-R23_12_1.pdf`
<<<<<<< HEAD:themes/gatsby-theme-deriv/src/pages/terms-and-conditions/_business-grid.tsx

const { region } = useBuildVariant()
=======
const { is_row } = useRegion()
>>>>>>> master:src/pages/terms-and-conditions/_business-grid.tsx
const language = getLanguage()

const general_terms_url_region = region === "row"
Expand Down

0 comments on commit d8948b6

Please sign in to comment.