Skip to content
This repository has been archived by the owner on Apr 15, 2019. It is now read-only.

Commit

Permalink
Show a message when there are no transactions
Browse files Browse the repository at this point in the history
  • Loading branch information
yasharAyari committed Aug 15, 2017
1 parent 0093761 commit 1ad4e33
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/components/transactions/transactionsComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import tableStyle from 'react-toolbox/lib/table/theme.css';
import { transactions } from '../../utils/api/account';
import TransactionsHeader from './transactionsHeader';
import TransactionRow from './transactionRow';
import styles from './transactions.css';

class Transactions extends React.Component {
constructor() {
Expand All @@ -25,8 +26,9 @@ class Transactions extends React.Component {

render() {
return (
<div className='box'>
<table className={tableStyle.table}>
<div className='box noPaddingBox'>
{this.props.transactions.length > 0 ?
<table className={tableStyle.table}>
<TransactionsHeader tableStyle={tableStyle}></TransactionsHeader>
<tbody>
{this.props.transactions.map(transaction => (
Expand All @@ -37,7 +39,9 @@ class Transactions extends React.Component {
</TransactionRow>
))}
</tbody>
</table>
</table> :
<p className={`${styles.empty} hasPaddingRow`}>No transactions</p>
}
<Waypoint onEnter={() => { this.loadMore(); } }></Waypoint>
</div>
);
Expand Down

0 comments on commit 1ad4e33

Please sign in to comment.