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

Konstantinos / Add Deriv cTrader FAQs on cTrader product page #5744

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
404 changes: 404 additions & 0 deletions src/features/pages/deriv-ctrader/browse-our-faq/data.tsx

Large diffs are not rendered by default.

19 changes: 19 additions & 0 deletions src/features/pages/deriv-ctrader/browse-our-faq/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import React from 'react'
import { ctrader_faq_data } from './data'
import DerivPrimeFaq from 'features/pages/partners/deriv-prime/browse-our-faq/deriv-prime-faq'
import Typography from 'features/components/atoms/typography'
import { Localize } from 'components/localization'
import Container from 'features/components/atoms/container'

const BrowseOurFaq = () => {
return (
<Container.Fixed margin_block="20x">
<Typography.Heading md={{ pt: '40x' }} align="center" as="h2">
<Localize translate_text="_t_Browse our FAQ_t_" />
</Typography.Heading>
<DerivPrimeFaq faqs={ctrader_faq_data} />
</Container.Fixed>
)
}

export default BrowseOurFaq
2 changes: 2 additions & 0 deletions src/features/pages/deriv-ctrader/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import CTraderHero from './hero-banner'
import CTraderNumbers from './trade-numbers'
import CTraderTradeDescription from './trade-description'
import CTraderWhyTrade from './why-trade'
import BrowseOurFaq from './browse-our-faq'
import CTraderTradeFeatures from './platform-features'
import HowToStartCTrader from './how-to-start'
import CTraderPlatformBanner from './platform-banner'
Expand Down Expand Up @@ -31,6 +32,7 @@ const DerivCTrader = () => {
)}

<OtherPlatforms />
<BrowseOurFaq />
<Footer />
</Layout>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { TString } from 'types/generics'

interface DerivPrimeFaqProps {
faqs: DerivPrimeFAQDataItem[]
subsection: TString
subsection?: TString
}

const DerivPrimeFaq = ({ faqs, subsection }: DerivPrimeFaqProps) => {
Expand All @@ -21,7 +21,7 @@ const DerivPrimeFaq = ({ faqs, subsection }: DerivPrimeFaqProps) => {
font_family="UBUNTU"
size="xlarge"
>
<Localize translate_text={subsection} />
{subsection && <Localize translate_text={subsection} />}
</Typography.Paragraph>
<Accordion.Root type="multiple">
{faqs.map((faqItem) => (
Expand All @@ -44,7 +44,10 @@ const DerivPrimeFaq = ({ faqs, subsection }: DerivPrimeFaqProps) => {
<Flex.Box key={answerItem.id}>
{answerItem.type === 'text' ? (
<Typography.Paragraph>
<Localize translate_text={answerItem.text} />
<Localize
translate_text={answerItem.text}
components={answerItem.components}
/>
</Typography.Paragraph>
) : answerItem.type === 'list' ? (
<ul>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import { ReactElement } from 'react'
import { TString } from 'types/generics'

export interface DerivPrimeFAQTextItem {
type: 'text'
id: number
text: TString
components?: ReactElement[]
}

export interface DerivPrimeFAQListItem {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/common/ctrader/ctrader-get.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/common/ctrader/ctrader-trade.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/common/ctrader/traders-hub-demo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/common/ctrader/traders-hub-real.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading