Skip to content

Commit

Permalink
Disable the swap list "Cancel" button
Browse files Browse the repository at this point in the history
It's not working as expected and is causing more confusion than it's helpful.
  • Loading branch information
sindresorhus committed Jun 21, 2018
1 parent aee8b81 commit 60d9fee
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions app/renderer/components/SwapList.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import Empty from 'components/Empty';
import SwapDetails from 'components/SwapDetails';
import './SwapList.scss';

// eslint-disable-next-line no-unused-vars
class CancelButton extends React.Component {
state = {
isCancelling: false,
Expand Down Expand Up @@ -38,7 +39,7 @@ class CancelButton extends React.Component {
}
}

const SwapItem = ({swap, showCancel}) => (
const SwapItem = ({swap}) => (
<div className={`row ${swap.orderType}`}>
<div className="timestamp">{formatDate(swap.timeStarted, 'HH:mm DD/MM/YY')}</div>
<div className="pairs">{swap.baseCurrency}/{swap.quoteCurrency}</div>
Expand All @@ -48,11 +49,13 @@ const SwapItem = ({swap, showCancel}) => (
<div className="status__icon" data-status={swap.status}>{swap.statusFormatted}</div>
</div>
<div className="buttons">
{showCancel &&
{/* Disabled until marketmaker v2
See: https://github.com/hyperdexapp/hyperdex/issues/262#issuecomment-396587751showCancel
&&
<div className="cancel">
<CancelButton swap={swap}/>
</div>
}
*/}
<div className="view">
<SwapDetails swap={swap}/>
</div>
Expand All @@ -69,7 +72,11 @@ const SwapList = ({swaps, showCancel}) => {
<div className="SwapList">
{
swaps.map(swap => (
<SwapItem key={swap.uuid} swap={swap} showCancel={showCancel}/>
<SwapItem
key={swap.uuid}
swap={swap}
showCancel={showCancel}
/>
))
}
</div>
Expand Down

0 comments on commit 60d9fee

Please sign in to comment.