Skip to content

Commit

Permalink
refactor: ♻️ refactors jurisdiction localize usages
Browse files Browse the repository at this point in the history
  • Loading branch information
shaheer-deriv committed Apr 27, 2023
1 parent 875850e commit 5b15629
Show file tree
Hide file tree
Showing 6 changed files with 119 additions and 123 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,84 +7,80 @@ export const jurisdictionBviContents = (): TJurisdictionCardItems => ({
synthetic_contents: [
{
key: 'assets',
title: `${localize('Assets')}`,
description: `${localize('Synthetics, Basket indices and Derived FX')}`,
title: localize('Assets'),
description: localize('Synthetics, Basket indices and Derived FX'),
title_indicators: {
type: 'displayText',
display_text: `${localize('40+')}`,
display_text: localize('40+'),
display_text_skin_color: 'red-darker',
},
},
{
key: 'leverage',
title: `${localize('Leverage')}`,
title: localize('Leverage'),
title_indicators: {
type: 'displayText',
display_text: `${localize('1:1000')}`,
display_text: localize('1:1000'),
display_text_skin_color: 'yellow-light',
},
},
{
key: 'verifications',
title: `${localize('Verifications')}`,
title: localize('Verifications'),
title_indicators: { type: 'displayIcons' },
clickable_description: [
{ type: 'link', text: `${localize('Learn more')}` },
{ type: 'text', text: `${localize('about verifications needed.')}` },
{ type: 'link', text: localize('Learn more') },
{ type: 'text', text: localize('about verifications needed.') },
],
},
{
key: 'regulator',
title: `${localize('Regulator/EDR')}`,
description: `${localize(
'British Virgin Islands Financial Services Commission (License no. SIBA/L/18/1114)'
)}`,
title: localize('Regulator/EDR'),
description: localize('British Virgin Islands Financial Services Commission (License no. SIBA/L/18/1114)'),
},
],
financial_contents: [
{
key: 'assets',
title: `${localize('Assets')}`,
description: `${localize('Forex, Stocks, Stock indices, Commodities, and Cryptocurrencies')}`,
title: localize('Assets'),
description: localize('Forex, Stocks, Stock indices, Commodities, and Cryptocurrencies'),
title_indicators: {
type: 'displayText',
display_text: `${localize('170+')}`,
display_text: localize('170+'),
display_text_skin_color: 'red-light',
},
},
{
key: 'leverage',
title: `${localize('Leverage')}`,
title: localize('Leverage'),
title_indicators: {
type: 'displayText',
display_text: `${localize('1:1000')}`,
display_text: localize('1:1000'),
display_text_skin_color: 'yellow-light',
},
},
{
key: 'spreadsFrom',
title: `${localize('Spreads from')}`,
title: localize('Spreads from'),
title_indicators: {
type: 'displayText',
display_text: `${localize('0.5 pips')}`,
display_text: localize('0.5 pips'),
display_text_skin_color: 'violet-dark',
},
},
{
key: 'verifications',
title: `${localize('Verifications')}`,
title: localize('Verifications'),
title_indicators: { type: 'displayIcons' },
clickable_description: [
{ type: 'link', text: `${localize('Learn more')}` },
{ type: 'text', text: `${localize('about verifications needed.')}` },
{ type: 'link', text: localize('Learn more') },
{ type: 'text', text: localize('about verifications needed.') },
],
},
{
key: 'regulator',
title: `${localize('Regulator/EDR')}`,
description: `${localize(
'British Virgin Islands Financial Services Commission (License no. SIBA/L/18/1114)'
)}`,
title: localize('Regulator/EDR'),
description: localize('British Virgin Islands Financial Services Commission (License no. SIBA/L/18/1114)'),
},
],
synthetic_verification_docs: ['document_number', 'name_and_address'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,69 +6,69 @@ export const jurisdictionLabuanContents = (): TJurisdictionCardItems => ({
is_over_header_available: true,
header: localize('Labuan'),
synthetic_contents: [
{ key: 'assets', title: `${localize('Assets')}`, description: `${localize('Forex and Cryptocurrencies')}` },
{ key: 'leverage', title: `${localize('Leverage')}` },
{ key: 'assets', title: localize('Assets'), description: localize('Forex and Cryptocurrencies') },
{ key: 'leverage', title: localize('Leverage') },
{
key: 'spreadsFrom',
title: `${localize('Spreads from')}`,
title: localize('Spreads from'),
},
{
key: 'verifications',
title: `${localize('Verifications')}`,
title: localize('Verifications'),
title_indicators: { type: 'displayIcons' },
clickable_description: [
{ type: 'link', text: `${localize('Learn more')}` },
{ type: 'text', text: `${localize('about verifications needed.')}` },
{ type: 'link', text: localize('Learn more') },
{ type: 'text', text: localize('about verifications needed.') },
],
},
{
key: 'regulator',
title: `${localize('Regulator/EDR')}`,
description: `${localize('Labuan Financial Services Authority (licence no. MB/18/0024)')}`,
title: localize('Regulator/EDR'),
description: localize('Labuan Financial Services Authority (licence no. MB/18/0024)'),
},
],
financial_contents: [
{
key: 'assets',
title: `${localize('Assets')}`,
description: `${localize('Forex and Cryptocurrencies')}`,
title: localize('Assets'),
description: localize('Forex and Cryptocurrencies'),
title_indicators: {
type: 'displayText',
display_text: `${localize('90+')}`,
display_text: localize('90+'),
display_text_skin_color: 'red-dark',
},
},
{
key: 'leverage',
title: `${localize('Leverage')}`,
title: localize('Leverage'),
title_indicators: {
type: 'displayText',
display_text: `${localize('1:100')}`,
display_text: localize('1:100'),
display_text_skin_color: 'yellow-dark',
},
},
{
key: 'spreadsFrom',
title: `${localize('Spreads from')}`,
title: localize('Spreads from'),
title_indicators: {
type: 'displayText',
display_text: `${localize('0.6 pips')}`,
display_text: localize('0.6 pips'),
display_text_skin_color: 'violet-dark',
},
},
{
key: 'verifications',
title: `${localize('Verifications')}`,
title: localize('Verifications'),
title_indicators: { type: 'displayIcons' },
clickable_description: [
{ type: 'link', text: `${localize('Learn more')}` },
{ type: 'text', text: `${localize('about verifications needed.')}` },
{ type: 'link', text: localize('Learn more') },
{ type: 'text', text: localize('about verifications needed.') },
],
},
{
key: 'regulator',
title: `${localize('Regulator/EDR')}`,
description: `${localize('Labuan Financial Services Authority (licence no. MB/18/0024)')}`,
title: localize('Regulator/EDR'),
description: localize('Labuan Financial Services Authority (licence no. MB/18/0024)'),
},
],
synthetic_verification_docs: ['document_number', 'name_and_address'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,78 +7,78 @@ export const jurisdictionSvgContents = (): TJurisdictionCardItems => ({
synthetic_contents: [
{
key: 'assets',
title: `${localize('Assets')}`,
description: `${localize('Synthetics, Basket indices and Derived FX')}`,
title: localize('Assets'),
description: localize('Synthetics, Basket indices and Derived FX'),
title_indicators: {
type: 'displayText',
display_text: `${localize('40+')}`,
display_text: localize('40+'),
display_text_skin_color: 'red-darker',
},
},
{
key: 'leverage',
title: `${localize('Leverage')}`,
title: localize('Leverage'),
title_indicators: {
type: 'displayText',
display_text: `${localize('1:1000')}`,
display_text: localize('1:1000'),
display_text_skin_color: 'yellow-light',
},
},
{
key: 'verifications',
title: `${localize('Verifications')}`,
title: localize('Verifications'),
title_indicators: { type: 'displayIcons' },
description: `${localize(
description: localize(
'You will need to submit proof of identity and address once you reach certain thresholds.'
)}`,
),
},
{
key: 'regulator',
title: `${localize('Regulator/EDR')}`,
description: `${localize('Deriv (SVG) LLC (company no. 273 LLC 2020)')}`,
title: localize('Regulator/EDR'),
description: localize('Deriv (SVG) LLC (company no. 273 LLC 2020)'),
},
],
financial_contents: [
{
key: 'assets',
title: `${localize('Assets')}`,
description: `${localize('Forex, Stocks, Stock indices, Commodities, and Cryptocurrencies')}`,
title: localize('Assets'),
description: localize('Forex, Stocks, Stock indices, Commodities, and Cryptocurrencies'),
title_indicators: {
type: 'displayText',
display_text: `${localize('170+')}`,
display_text: localize('170+'),
display_text_skin_color: 'red-light',
},
},
{
key: 'leverage',
title: `${localize('Leverage')}`,
title: localize('Leverage'),
title_indicators: {
type: 'displayText',
display_text: `${localize('1:1000')}`,
display_text: localize('1:1000'),
display_text_skin_color: 'yellow-light',
},
},
{
key: 'spreadsFrom',
title: `${localize('Spreads from')}`,
title: localize('Spreads from'),
title_indicators: {
type: 'displayText',
display_text: `${localize('0.6 pips')}`,
display_text: localize('0.6 pips'),
display_text_skin_color: 'violet-dark',
},
},
{
key: 'verifications',
title: `${localize('Verifications')}`,
title: localize('Verifications'),
title_indicators: { type: 'displayIcons' },
description: `${localize(
description: localize(
'You will need to submit proof of identity and address once you reach certain thresholds.'