diff --git a/ui/app/components/app/transaction-list/transaction-list.component.js b/ui/app/components/app/transaction-list/transaction-list.component.js index 0074225d1..3f4a6210e 100644 --- a/ui/app/components/app/transaction-list/transaction-list.component.js +++ b/ui/app/components/app/transaction-list/transaction-list.component.js @@ -15,6 +15,7 @@ export default class TransactionList extends PureComponent { } static propTypes = { + isWideViewport: PropTypes.bool.isRequired, pendingTransactions: PropTypes.array, completedTransactions: PropTypes.array, selectedToken: PropTypes.object, @@ -80,7 +81,7 @@ export default class TransactionList extends PureComponent { renderTransactions () { const { t } = this.context - const { pendingTransactions = [], completedTransactions = [] } = this.props + const { isWideViewport, pendingTransactions = [], completedTransactions = [] } = this.props const pendingLength = pendingTransactions.length return ( @@ -101,11 +102,13 @@ export default class TransactionList extends PureComponent { }
{ - pendingLength > 0 && ( -
- { t('history') } -
- ) + isWideViewport || pendingLength > 0 + ? ( +
+ { t('history') } +
+ ) + : null } { completedTransactions.length > 0 diff --git a/ui/app/components/app/transaction-list/transaction-list.container.js b/ui/app/components/app/transaction-list/transaction-list.container.js index a6f08603f..036d1e8b9 100644 --- a/ui/app/components/app/transaction-list/transaction-list.container.js +++ b/ui/app/components/app/transaction-list/transaction-list.container.js @@ -1,4 +1,5 @@ import { connect } from 'react-redux' +import PropTypes from 'prop-types' import TransactionList from './transaction-list.component' import { nonceSortedCompletedTransactionsSelector, @@ -43,4 +44,14 @@ const mergeProps = (stateProps, dispatchProps, ownProps) => { } } -export default connect(mapStateToProps, mapDispatchToProps, mergeProps)(TransactionList) +const TransactionListContainer = connect(mapStateToProps, mapDispatchToProps, mergeProps)(TransactionList) + +TransactionListContainer.propTypes = { + isWideViewport: PropTypes.bool, +} + +TransactionListContainer.defaultProps = { + isWideViewport: false, +} + +export default TransactionListContainer diff --git a/ui/app/pages/home/home.component.js b/ui/app/pages/home/home.component.js index a60ff2eba..475c15adc 100644 --- a/ui/app/pages/home/home.component.js +++ b/ui/app/pages/home/home.component.js @@ -189,7 +189,7 @@ export default class Home extends PureComponent {
- +
)