0e1df68cc2
Includes -some better error messages when using credits (publish, tip, send) -claim new user reward after phone verification (requires API change) -vertical stacking on send screen -add missing blank slate message for transaction history
43 lines
1.2 KiB
JavaScript
43 lines
1.2 KiB
JavaScript
import React from 'react';
|
|
import BusyIndicator from 'component/common/busy-indicator';
|
|
import TransactionList from 'component/transactionList';
|
|
import Page from 'component/page';
|
|
|
|
class TransactionHistoryPage extends React.PureComponent {
|
|
componentWillMount() {
|
|
this.props.fetchTransactions();
|
|
}
|
|
|
|
render() {
|
|
const { fetchingTransactions, transactions } = this.props;
|
|
|
|
return (
|
|
<Page>
|
|
<section className="card card--section">
|
|
<div
|
|
className={`card__title ${
|
|
fetchingTransactions && transactions.length ? 'reloading' : ''
|
|
}`}
|
|
>
|
|
<h3>{__('Transaction History')}</h3>
|
|
</div>
|
|
{fetchingTransactions && !transactions.length ? (
|
|
<div className="card__content">
|
|
<BusyIndicator message={__('Loading transactions')} />
|
|
</div>
|
|
) : (
|
|
''
|
|
)}
|
|
{transactions && transactions.length ? (
|
|
<TransactionList transactions={transactions} />
|
|
) : (
|
|
<div className="card__content">{__("Looks like you don't have any transactions")}</div>
|
|
)}
|
|
</section>
|
|
</Page>
|
|
);
|
|
}
|
|
}
|
|
|
|
export default TransactionHistoryPage;
|