Skip to content

Commit

Permalink
Merge pull request steemit#3778 from steemit/develop
Browse files Browse the repository at this point in the history
update Coin Marketplace
  • Loading branch information
xxo1shine authored Apr 14, 2020
2 parents b0ce345 + ea0c9b5 commit 91f4fb4
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 15 deletions.
71 changes: 57 additions & 14 deletions src/app/components/elements/SteemMarket.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,63 @@ class Coin extends Component {
const pricesUsd = timepoints
.map(point => parseFloat(point.get('price_usd')))
.toJS();

let url = '';

switch (symbol) {
case 'STEEM':
url = 'https://poloniex.com/exchange#trx_steem';
break;
case 'BTC':
url = 'https://poloniex.com/exchange#usdt_btc';
break;
case 'ETH':
url = 'https://poloniex.com/exchange#usdt_eth';
break;
case 'SBD':
url = '';
break;
case 'TRX':
url = 'https://poloniex.com/exchange#usdt_trx';
break;
default:
url = '';
}
return (
<div ref="coin" className="coin">
<div className="chart">
<Sparklines data={pricesUsd}>
<SparklinesLine
color={color}
style={{ strokeWidth: 3.0 }}
onMouseMove={e => {
console.log(e);
}}
/>
</Sparklines>
<div className="caption" />
</div>
<div
ref="coin"
className="coin"
style={{ display: `${symbol === 'XRP' ? 'none' : 'block'}` }}
>
{url ? (
<a href={url} target="_blank">
<div className="chart">
<Sparklines data={pricesUsd}>
<SparklinesLine
color={color}
style={{ strokeWidth: 3.0 }}
onMouseMove={e => {
console.log(e);
}}
/>
</Sparklines>
<div className="caption" />
</div>
</a>
) : (
<div className="chart">
<Sparklines data={pricesUsd}>
<SparklinesLine
color={color}
style={{ strokeWidth: 3.0 }}
onMouseMove={e => {
console.log(e);
}}
/>
</Sparklines>
<div className="caption" />
</div>
)}
<div className="coin-label">
<span className="symbol">{symbol}</span>{' '}
<span className="price">
Expand Down Expand Up @@ -105,14 +148,14 @@ class SteemMarket extends Component {
<div className="c-sidebar__content">
<div className="steem-market">
<Coin coin={steem} color="#09d6a8" />
<Coin coin={sbd} color="#09d6a8" />
{topCoins.map(coin => (
<Coin
key={coin.get('name')}
coin={coin}
color="#788187"
/>
))}
<Coin coin={sbd} color="#09d6a8" />
</div>
</div>
</div>
Expand Down
16 changes: 15 additions & 1 deletion src/app/components/modules/SidePanel/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,13 @@ const SidePanel = ({
onClick: toggleNightmode,
},
],

exchanges: [
{
value: 'poloniex',
label: 'Poloniex',
link: 'https://poloniex.com/exchange#trx_steem',
},
],
wallet: [
{
label: tt('navigation.stolen_account_recovery'),
Expand Down Expand Up @@ -176,6 +182,14 @@ const SidePanel = ({
<ul className="vertical menu">
{sidePanelLinks.wallet.map(makeLink)}
</ul>
<ul className="vertical menu">
<li>
<a className="menu-section">
{tt('navigation.third_party_exchanges')}
</a>
</li>
{sidePanelLinks.exchanges.map(makeLink)}
</ul>
<ul className="vertical menu">
{sidePanelLinks.external.map(makeLink)}
</ul>
Expand Down

0 comments on commit 91f4fb4

Please sign in to comment.