Skip to content

Commit

Permalink
Fix etf kid for non eng language (binary-com#5800)
Browse files Browse the repository at this point in the history
* fix: 🐛 fix kid etf for non eng language

* fix: ✏️ fix typo

* fix: 🐛 fix  non supported languages for docmuents

* fix: 🐛 for multiplier documents
  • Loading branch information
mitra-deriv authored Oct 23, 2023
1 parent f032203 commit 36231b7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pages/regulatory/_document_accordion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ const DocumentAccordion = (locale: DocumentAccordionProps) => {
target="_blank"
rel="noopener noreferrer"
href={`/regulatory/kid/${
is_supported_language(selected_language)
is_supported_language(selected_language) && !data.is_only_en
? selected_language + '/'
: ''
}${data.ref}`}
Expand All @@ -174,7 +174,7 @@ const DocumentAccordion = (locale: DocumentAccordionProps) => {
target="_blank"
rel="noopener noreferrer"
href={`/regulatory/kid/${
is_supported_language(selected_language)
is_supported_language(selected_language) && !data.is_only_en
? selected_language + '/'
: ''
}${data.ref}`}
Expand Down
6 changes: 6 additions & 0 deletions src/pages/regulatory/data/_kid_data.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { TString } from 'types/generics'
type kidType = {
title: TString
ref: string
is_only_en?: boolean
}

const kid_data: kidType[] = [
Expand Down Expand Up @@ -30,15 +31,18 @@ const kid_data: kidType[] = [
{
title: '_t_CFDs - Synthetics: Volatility 250 (1s) Index_t_',
ref: 'kid_deriv_CFD_synthetic_vol_250.pdf',
is_only_en: true,
},

{
title: '_t_CFDs - Synthetics: Crash 300 Index_t_',
ref: 'kid_deriv_CFD_synthetic_crash_300.pdf',
is_only_en: true,
},
{
title: '_t_CFDs - ETFs_t_',
ref: 'kid_deriv_cfds_etfs.pdf',
is_only_en: true,
},
]
const kid_data_multiplier = [
Expand All @@ -53,10 +57,12 @@ const kid_data_multiplier = [
{
title: '_t_Multipliers - Synthetics: Volatility 250 (1s) Index_t_',
ref: 'kid_deriv_multipliers_synthetics_vol_250.pdf',
is_only_en: true,
},
{
title: '_t_Multipliers - Synthetics: Crash 300 Index_t_',
ref: 'kid_deriv_multipliers_synthetics_crash_300.pdf',
is_only_en: true,
},
]

Expand Down

0 comments on commit 36231b7

Please sign in to comment.