diff --git a/src/presentation/assets/images/partners/trade_smart_changelly.png b/src/presentation/assets/images/partners/trade_smart_changelly.png index 95dddd2..c48f0d6 100644 Binary files a/src/presentation/assets/images/partners/trade_smart_changelly.png and b/src/presentation/assets/images/partners/trade_smart_changelly.png differ diff --git a/src/presentation/components/partners/partners.js b/src/presentation/components/partners/partners.js new file mode 100644 index 0000000..a450564 --- /dev/null +++ b/src/presentation/components/partners/partners.js @@ -0,0 +1,17 @@ +import React from 'react'; +import { partners } from './partners_vars'; +import styles from './partners.module.scss'; + +const electron = window.require('electron'); + +export function Partners() { + return ( +
+ {partners.map((partner) => ( + + ))} +
+ ); +} diff --git a/src/presentation/components/partners/partners.module.scss b/src/presentation/components/partners/partners.module.scss new file mode 100644 index 0000000..635e717 --- /dev/null +++ b/src/presentation/components/partners/partners.module.scss @@ -0,0 +1,9 @@ +.root { + padding: 10px; + display: flex; + flex-wrap: wrap; + + button ~ button { + margin-left: 16px; + } +} diff --git a/src/presentation/components/random-partners/partners.js b/src/presentation/components/partners/partners_vars.js similarity index 94% rename from src/presentation/components/random-partners/partners.js rename to src/presentation/components/partners/partners_vars.js index 72a41b0..ae6d090 100644 --- a/src/presentation/components/random-partners/partners.js +++ b/src/presentation/components/partners/partners_vars.js @@ -10,6 +10,6 @@ export const partners = [ { image: trade_smart_changelly, url: 'https://pro.changelly.com/referral/c8b8074764b01982', - name: 'Changelly' + name: 'Changelly Pro' } ]; diff --git a/src/presentation/components/random-partners/random-partners.js b/src/presentation/components/random-partners/random-partners.js deleted file mode 100644 index ca236b9..0000000 --- a/src/presentation/components/random-partners/random-partners.js +++ /dev/null @@ -1,21 +0,0 @@ -import { partners } from './partners'; -import React, { useEffect, useState } from 'react'; - -const electron = window.require('electron'); - -export function RandomPartners() { - const randomPartner = () => Math.floor(Math.random() * partners.length); - const [partner, setPartner] = useState(partners[randomPartner()]); - - useEffect(() => { - setInterval(() => setPartner(partners[randomPartner()]), 5000); - }, []); - - return ( - <> - - - ); -} diff --git a/src/presentation/pages/receive/Receive.js b/src/presentation/pages/receive/Receive.js index ab27662..362cf07 100644 --- a/src/presentation/pages/receive/Receive.js +++ b/src/presentation/pages/receive/Receive.js @@ -8,7 +8,7 @@ import { Scrollbars } from 'react-custom-scrollbars'; import { saveAs } from 'file-saver'; import { ReactComponent as IconDownload } from '../../assets/images/fileDownload.svg'; import { ReactComponent as IconCopy } from '../../assets/images/copy.svg'; -import { RandomPartners } from 'presentation/components/random-partners/random-partners'; +import { Partners } from 'presentation/components/partners/partners'; const electron = window.require('electron'); function Receive() { @@ -115,7 +115,7 @@ function Receive() { )}
- +
diff --git a/src/presentation/pages/rewards/activate.js b/src/presentation/pages/rewards/activate.js index 5a94131..c74719a 100644 --- a/src/presentation/pages/rewards/activate.js +++ b/src/presentation/pages/rewards/activate.js @@ -13,7 +13,7 @@ import { ActivateContext, ActivateProvider } from './ActivateContext'; import useModal from 'application/hooks/useModal'; import { PasswordModal } from 'presentation/components/password-modal/passsword-modal'; import loader from 'presentation/assets/images/loader.svg'; -import { RandomPartners } from 'presentation/components/random-partners/random-partners'; +import { Partners } from 'presentation/components/partners/partners'; function RewardsActivateComponent() { const { wallets, walletCurrent: address } = useContext(WalletContext); @@ -219,7 +219,7 @@ function RewardsActivateComponent() {
- +
)} diff --git a/src/presentation/pages/send/Send.js b/src/presentation/pages/send/Send.js index 8ca8f8f..2683122 100644 --- a/src/presentation/pages/send/Send.js +++ b/src/presentation/pages/send/Send.js @@ -6,7 +6,7 @@ import loader from 'presentation/assets/images/loader.svg'; import { Balance } from 'presentation/components/Balance'; import Page from 'presentation/components/Page'; import { PasswordModal } from 'presentation/components/password-modal/passsword-modal'; -import { RandomPartners } from 'presentation/components/random-partners/random-partners'; +import { Partners } from 'presentation/components/partners/partners'; import React, { useContext, useEffect } from 'react'; import Scrollbars from 'react-custom-scrollbars'; import MaskedInput from 'react-text-mask'; @@ -266,7 +266,7 @@ function SendComponent() { )}
- +