From 726fda2da50539f1f553375d6b4ba4c68ce312eb Mon Sep 17 00:00:00 2001 From: amina-deriv Date: Mon, 10 Jan 2022 14:51:14 +0400 Subject: [PATCH] jump-indices-ts --- .../{_dBanner.js => _dBanner.tsx} | 0 .../jump-indices/{_dHero.js => _dHero.tsx} | 2 +- .../{_jumpSection.js => _jumpSection.tsx} | 0 .../{_leverages.js => _leverages.tsx} | 53 ++++++++++++------- .../jump-indices/{index.js => index.tsx} | 6 +-- tsconfig.json | 3 +- 6 files changed, 39 insertions(+), 25 deletions(-) rename src/pages/landing/jump-indices/{_dBanner.js => _dBanner.tsx} (100%) rename src/pages/landing/jump-indices/{_dHero.js => _dHero.tsx} (98%) rename src/pages/landing/jump-indices/{_jumpSection.js => _jumpSection.tsx} (100%) rename src/pages/landing/jump-indices/{_leverages.js => _leverages.tsx} (66%) rename src/pages/landing/jump-indices/{index.js => index.tsx} (84%) diff --git a/src/pages/landing/jump-indices/_dBanner.js b/src/pages/landing/jump-indices/_dBanner.tsx similarity index 100% rename from src/pages/landing/jump-indices/_dBanner.js rename to src/pages/landing/jump-indices/_dBanner.tsx diff --git a/src/pages/landing/jump-indices/_dHero.js b/src/pages/landing/jump-indices/_dHero.tsx similarity index 98% rename from src/pages/landing/jump-indices/_dHero.js rename to src/pages/landing/jump-indices/_dHero.tsx index e5bd715884a..6b424f9587c 100644 --- a/src/pages/landing/jump-indices/_dHero.js +++ b/src/pages/landing/jump-indices/_dHero.tsx @@ -123,7 +123,7 @@ const StyledAnimationWrapper = styled(Flex)` ` const DHero = () => { - const animation_container = createRef() + const animation_container = createRef() useEffect(() => { const anim = lottie.loadAnimation({ container: animation_container.current, diff --git a/src/pages/landing/jump-indices/_jumpSection.js b/src/pages/landing/jump-indices/_jumpSection.tsx similarity index 100% rename from src/pages/landing/jump-indices/_jumpSection.js rename to src/pages/landing/jump-indices/_jumpSection.tsx diff --git a/src/pages/landing/jump-indices/_leverages.js b/src/pages/landing/jump-indices/_leverages.tsx similarity index 66% rename from src/pages/landing/jump-indices/_leverages.js rename to src/pages/landing/jump-indices/_leverages.tsx index f6f1e0f1a1b..16fff1e4751 100644 --- a/src/pages/landing/jump-indices/_leverages.js +++ b/src/pages/landing/jump-indices/_leverages.tsx @@ -1,8 +1,8 @@ -import React from 'react' +import React, { ReactElement } from 'react' import styled from 'styled-components' import { Flex } from 'components/containers' import { Header } from 'components/elements' -import { localize } from 'components/localization' +import { localize, Localize } from 'components/localization' import { LinkButton } from 'components/form' import device from 'themes/device.js' import TradingIcon from 'images/svg/jump-indices/jump-indices-24-7-trading.svg' @@ -80,28 +80,41 @@ const StyledLinkButton = styled(LinkButton)` padding: 11px 16px; ` +type ContentType = { + imgsrc: string + header: ReactElement + title: ReactElement +} + +const content: ContentType[] = [ + { + imgsrc: TradingIcon, + header: , + title: ( + + ), + }, + { + imgsrc: LeverageIcon, + header: , + title: ( + + ), + }, +] const Leverages = () => { return ( - - - {localize('Available 24/7')} - - {localize( - 'As jump indices are synthetics, you can trade them 24/7, 365 days of the year.', - )} - - - - - {localize('High leverage')} - - {localize( - 'Trade with high leverage ratios to have even more opportunities to increase your position size.', - )} - - + {content.map((item, index) => ( + + + {item.header} + + {item.title} + + + ))}