diff options
author | Alexander Tseung <alextsg@gmail.com> | 2017-12-07 13:01:11 +0800 |
---|---|---|
committer | Alexander Tseung <alextsg@gmail.com> | 2017-12-07 13:01:11 +0800 |
commit | b9f2f8c2a78332a2522d49baedf25e894273ef38 (patch) | |
tree | de6c2f30dbfa3e464f70ca800fd69aa131aa32ba /ui/app/components/transaction-list-item.js | |
parent | b26c97529424f8d8cb90364e9114c054c76e10e5 (diff) | |
download | tangerine-wallet-browser-b9f2f8c2a78332a2522d49baedf25e894273ef38.tar tangerine-wallet-browser-b9f2f8c2a78332a2522d49baedf25e894273ef38.tar.gz tangerine-wallet-browser-b9f2f8c2a78332a2522d49baedf25e894273ef38.tar.bz2 tangerine-wallet-browser-b9f2f8c2a78332a2522d49baedf25e894273ef38.tar.lz tangerine-wallet-browser-b9f2f8c2a78332a2522d49baedf25e894273ef38.tar.xz tangerine-wallet-browser-b9f2f8c2a78332a2522d49baedf25e894273ef38.tar.zst tangerine-wallet-browser-b9f2f8c2a78332a2522d49baedf25e894273ef38.zip |
Show retry button on submitted transactions greater than 30 seconds, add hover styling
Diffstat (limited to 'ui/app/components/transaction-list-item.js')
-rw-r--r-- | ui/app/components/transaction-list-item.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/ui/app/components/transaction-list-item.js b/ui/app/components/transaction-list-item.js index fa6c5915d..42ef665b1 100644 --- a/ui/app/components/transaction-list-item.js +++ b/ui/app/components/transaction-list-item.js @@ -28,6 +28,12 @@ function TransactionListItem () { Component.call(this) } +TransactionListItem.prototype.showRetryButton = function () { + const { transaction = {} } = this.props + const { status, time } = transaction + return status === 'submitted' && Date.now() - time > 30000 +} + TransactionListItem.prototype.render = function () { const { transaction, network, conversionRate, currentCurrency } = this.props const { status } = transaction @@ -114,7 +120,7 @@ TransactionListItem.prototype.render = function () { }) : h('.flex-column'), ]), - transaction.status === 'submitted' && h('.transition-list-item__retry', { + this.showRetryButton() && h('.transition-list-item__retry.grow-on-hover', { onClick: event => { event.stopPropagation() this.resubmit() |