Skip to content

Commit

Permalink
update partners component
Browse files Browse the repository at this point in the history
  • Loading branch information
jpteodosio committed Apr 23, 2021
1 parent ecfbe3c commit 6526610
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 28 deletions.
Binary file modified src/presentation/assets/images/partners/trade_smart_changelly.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions src/presentation/components/partners/partners.js
Original file line number Diff line number Diff line change
@@ -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 (
<div className={styles.root}>
{partners.map((partner) => (
<button type="button" className="btn" onClick={() => electron.shell.openExternal(partner.url)}>
<img src={partner.image} alt={partner.name} width="180" />
</button>
))}
</div>
);
}
9 changes: 9 additions & 0 deletions src/presentation/components/partners/partners.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.root {
padding: 10px;
display: flex;
flex-wrap: wrap;

button ~ button {
margin-left: 16px;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ export const partners = [
{
image: trade_smart_changelly,
url: 'https://pro.changelly.com/referral/c8b8074764b01982',
name: 'Changelly'
name: 'Changelly Pro'
}
];
21 changes: 0 additions & 21 deletions src/presentation/components/random-partners/random-partners.js

This file was deleted.

4 changes: 2 additions & 2 deletions src/presentation/pages/receive/Receive.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -115,7 +115,7 @@ function Receive() {
)}
</div>
<div className="partnersWrap">
<RandomPartners />
<Partners />
</div>
</Scrollbars>
</Page>
Expand Down
4 changes: 2 additions & 2 deletions src/presentation/pages/rewards/activate.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -219,7 +219,7 @@ function RewardsActivateComponent() {
<SmartNodeRewardsRoi />

<div className="partnersWrap">
<RandomPartners />
<Partners />
</div>
</div>
)}
Expand Down
4 changes: 2 additions & 2 deletions src/presentation/pages/send/Send.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -266,7 +266,7 @@ function SendComponent() {
)}

<div className="buttonsWrapper">
<RandomPartners />
<Partners />
<button type="submit" onClick={() => send()} disabled={!canSend()}>
Send
</button>
Expand Down

0 comments on commit 6526610

Please sign in to comment.