Skip to content

Commit

Permalink
chore: fixed help center pages (binary-com#7451)
Browse files Browse the repository at this point in the history
  • Loading branch information
hasan-deriv authored Mar 29, 2024
1 parent 85cb737 commit 1aafc90
Show file tree
Hide file tree
Showing 12 changed files with 48 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ import { WithIntl } from 'components/localization'
import { SEO } from 'components/containers'
import { TGatsbyHead } from 'features/types'

const AboutDeriv = () => <QuestionsTemplate data={about_deriv} />
const AboutDeriv = ({ pageContext }: TGatsbyHead) => {
const { region } = pageContext
return <QuestionsTemplate data={about_deriv} region={region}/>
}

export default WithIntl()(AboutDeriv)

Expand Down
5 changes: 4 additions & 1 deletion themes/gatsby-theme-deriv/src/pages/help-centre/account.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ import { WithIntl } from 'components/localization'
import { SEO } from 'components/containers'
import { TGatsbyHead } from 'features/types'

const Account = () => <QuestionsTemplate data={account} />
const Account = ({ pageContext }: TGatsbyHead) => {
const { region } = pageContext
return <QuestionsTemplate data={account} region={region}/>
}

export default WithIntl()(Account)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ import { WithIntl } from 'components/localization'
import { SEO } from 'components/containers'
import { TGatsbyHead } from 'features/types'

const AffiliateProgramme = () => <QuestionsTemplate data={affiliate_programme} />
const AffiliateProgramme = ({ pageContext }: TGatsbyHead) => {
const { region } = pageContext
return <QuestionsTemplate data={affiliate_programme} region={region} />
}

export default WithIntl()(AffiliateProgramme)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ import { WithIntl } from 'components/localization'
import { SEO } from 'components/containers'
import { TGatsbyHead } from 'features/types'

const ComplaintsProcedure = () => <QuestionsTemplate data={complaints_procedure} />
const ComplaintsProcedure = ({ pageContext }: TGatsbyHead) => {
const { region } = pageContext
return <QuestionsTemplate data={complaints_procedure} region={region} />
}

export default WithIntl()(ComplaintsProcedure)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ import { WithIntl } from 'components/localization'
import { SEO } from 'components/containers'
import { TGatsbyHead } from 'features/types'

const DepositsAndWithdrawal = () => <QuestionsTemplate data={deposits_and_withdrawals} />
const DepositsAndWithdrawal = ({ pageContext }: TGatsbyHead) => {
const { region } = pageContext
return <QuestionsTemplate data={deposits_and_withdrawals}region={region} />
}

export default WithIntl()(DepositsAndWithdrawal)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ import { WithIntl } from 'components/localization'
import { SEO } from 'components/containers'
import { TGatsbyHead } from 'features/types'

const DTrader = () => <QuestionsTemplate data={dtrader} />
const DTrader = ({ pageContext }: TGatsbyHead) => {
const { region } = pageContext
return <QuestionsTemplate data={dtrader} region={region}/>
}

export default WithIntl()(DTrader)

Expand Down
5 changes: 4 additions & 1 deletion themes/gatsby-theme-deriv/src/pages/help-centre/dmt5.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ import { WithIntl } from 'components/localization'
import { SEO } from 'components/containers'
import { TGatsbyHead } from 'features/types'

const DMT5 = () => <QuestionsTemplate data={dmt5} />
const DMT5 = ({ pageContext }: TGatsbyHead) => {
const { region } = pageContext
return <QuestionsTemplate data={dmt5} region={region}/>
}

export default WithIntl()(DMT5)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ import { WithIntl } from 'components/localization'
import { SEO } from 'components/containers'
import { TGatsbyHead } from 'features/types'

const FraudPrevention = () => <QuestionsTemplate data={fraud_prevention} />
const FraudPrevention = ({ pageContext }: TGatsbyHead) => {
const { region } = pageContext
return <QuestionsTemplate data={fraud_prevention} region={region}/>
}

export default WithIntl()(FraudPrevention)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ import { WithIntl } from 'components/localization'
import { SEO } from 'components/containers'
import { TGatsbyHead } from 'features/types'

const IbProgramme = () => <QuestionsTemplate data={ib_programme} />
const IbProgramme = ({ pageContext }: TGatsbyHead) => {
const { region } = pageContext
return <QuestionsTemplate data={ib_programme} region={region} />
}

export default WithIntl()(IbProgramme)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ import { WithIntl } from 'components/localization'
import { SEO } from 'components/containers'
import { TGatsbyHead } from 'features/types'

const PaymentAgent = () => <QuestionsTemplate data={payment_agent} />
const PaymentAgent = ({ pageContext }: TGatsbyHead) => {
const { region } = pageContext
return <QuestionsTemplate data={payment_agent} region={region} />
}

export default WithIntl()(PaymentAgent)

Expand Down
5 changes: 4 additions & 1 deletion themes/gatsby-theme-deriv/src/pages/help-centre/security.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ import { WithIntl } from 'components/localization'
import { SEO } from 'components/containers'
import { TGatsbyHead } from 'features/types'

const Security = () => <QuestionsTemplate data={security} />
const Security = ({ pageContext }: TGatsbyHead) => {
const { region } = pageContext
return <QuestionsTemplate data={security} region={region} />
}

export default WithIntl()(Security)

Expand Down
5 changes: 4 additions & 1 deletion themes/gatsby-theme-deriv/src/pages/help-centre/trading.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ import { WithIntl } from 'components/localization'
import { TGatsbyHead } from 'features/types'
import { SEO } from 'components/containers'

const Trading = () => <QuestionsTemplate data={trading} />
const Trading = ({ pageContext }: TGatsbyHead) => {
const { region } = pageContext
return <QuestionsTemplate data={trading} region={region} />
}

export default WithIntl()(Trading)

Expand Down

0 comments on commit 1aafc90

Please sign in to comment.