Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Mitra/Convert Terms & Conditions page to TS #2436

Merged
Merged
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
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react'
import PropTypes from 'prop-types'
import { StyledGrid, StyledContainer, IconWrapper, GridCol, Cta } from './_terms-conditions-style'
import { Header, Text } from 'components/elements'
import { localize } from 'components/localization'
Expand All @@ -10,7 +9,15 @@ import PA from 'images/svg/terms/business-pa-tc.svg'
import API from 'images/svg/terms/business-api-tc.svg'
import PDF from 'images/svg/regulatory/pdf-icon-black.svg'

const Col = ({ Icon, content, link_title, title, url }) => (
type ColProps = {
Icon: string
content: string
title: string
link_title: string
url: string
}

const Col = ({ Icon, content, link_title, title, url }: ColProps) => (
<GridCol>
<IconWrapper>
<img src={Icon} />
Expand All @@ -27,13 +34,6 @@ const Col = ({ Icon, content, link_title, title, url }) => (
</Cta>
</GridCol>
)
Col.propTypes = {
content: PropTypes.string,
Icon: PropTypes.elementType,
link_title: PropTypes.string,
title: PropTypes.string,
url: PropTypes.string,
}

const IconGrid = () => (
<StyledContainer>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react'
import PropTypes from 'prop-types'
import { StyledGrid, StyledContainer, IconWrapper, GridCol, Cta } from './_terms-conditions-style'
import { Show } from 'components/containers'
import { Header, Text } from 'components/elements'
Expand All @@ -13,7 +12,20 @@ import Risk from 'images/svg/terms/risk-tc.svg'
import PDF from 'images/svg/regulatory/pdf-icon-black.svg'
import BFX from 'images/svg/terms/bfx-tc.svg'

const Col = ({ Icon, content, title, eu_links, non_eu_links }) => (
type ColProps = {
Icon: string
content: string
title: string
non_eu_links: Link[]
eu_links?: Link[]
}

type Link = {
url: string
title: string
}

const Col = ({ Icon, content, title, eu_links, non_eu_links }: ColProps) => (
<GridCol>
<IconWrapper>
<img src={Icon} />
Expand Down Expand Up @@ -44,13 +56,6 @@ const Col = ({ Icon, content, title, eu_links, non_eu_links }) => (
</Show.Eu>
</GridCol>
)
Col.propTypes = {
content: PropTypes.string,
eu_links: PropTypes.array,
Icon: PropTypes.elementType,
non_eu_links: PropTypes.array,
title: PropTypes.string,
}

const IconGrid = () => {
const columns = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { Header, Tabs } from 'components/elements'
import { localize, WithIntl } from 'components/localization'

const Section = styled(SectionContainer)`
background-color: ${(props) => props.bgcolor || 'transparent'};
background-color: ${(props) => props.bgColor || 'transparent'};
`

const TermsAndConditions = () => {
Expand Down