diff options
author | Alexander Tseung <alextsg@users.noreply.github.com> | 2017-10-14 05:14:26 +0800 |
---|---|---|
committer | Daniel Tsui <szehungdanieltsui@gmail.com> | 2017-10-14 05:14:26 +0800 |
commit | 3fd9c8b57fe46d14772086980e0e92573c1799f2 (patch) | |
tree | 342869dbad4b883be89029835e6ebf004c510895 /ui | |
parent | b149cceda01318d04195fc2196c29c5d9f67cda0 (diff) | |
download | tangerine-wallet-browser-3fd9c8b57fe46d14772086980e0e92573c1799f2.tar tangerine-wallet-browser-3fd9c8b57fe46d14772086980e0e92573c1799f2.tar.gz tangerine-wallet-browser-3fd9c8b57fe46d14772086980e0e92573c1799f2.tar.bz2 tangerine-wallet-browser-3fd9c8b57fe46d14772086980e0e92573c1799f2.tar.lz tangerine-wallet-browser-3fd9c8b57fe46d14772086980e0e92573c1799f2.tar.xz tangerine-wallet-browser-3fd9c8b57fe46d14772086980e0e92573c1799f2.tar.zst tangerine-wallet-browser-3fd9c8b57fe46d14772086980e0e92573c1799f2.zip |
Fix cursor on unclickable transactions (#2356)
Diffstat (limited to 'ui')
-rw-r--r-- | ui/app/components/tx-list.js | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/ui/app/components/tx-list.js b/ui/app/components/tx-list.js index 137cccf37..a02849d0e 100644 --- a/ui/app/components/tx-list.js +++ b/ui/app/components/tx-list.js @@ -8,6 +8,7 @@ const TxListItem = require('./tx-list-item') const ShiftListItem = require('./shift-list-item') const { formatBalance, formatDate } = require('../util') const { showConfTxPage } = require('../actions') +const classnames = require('classnames') module.exports = connect(mapStateToProps, mapDispatchToProps)(TxList) @@ -97,18 +98,23 @@ TxList.prototype.renderTransactionListItem = function (transaction, conversionRa address, transactionAmount, transactionHash, - className: '.tx-list-item.tx-list-clickable', conversionRate, } - if (transactionStatus === 'unapproved') { + const isUnapproved = transactionStatus === 'unapproved'; + + if (isUnapproved) { opts.onClick = () => showConfTxPage({id: transActionId}) - opts.className += '.tx-list-pending-item-container' opts.transactionStatus = 'Not Started' } else if (transactionHash) { opts.onClick = () => this.view(transactionHash, transactionNetworkId) } + opts.className = classnames('.tx-list-item', { + '.tx-list-pending-item-container': isUnapproved, + '.tx-list-clickable': Boolean(transactionHash) || isUnapproved, + }) + return h(TxListItem, opts) } |