2018-03-26 14:32:43 -07:00
|
|
|
// @flow
|
2019-06-17 16:32:38 -04:00
|
|
|
import React from 'react';
|
2017-12-21 18:08:54 -03:00
|
|
|
import TransactionList from 'component/transactionList';
|
2019-11-01 15:17:06 -04:00
|
|
|
import { TX_LIST } from 'lbry-redux';
|
2017-08-20 17:42:00 -04:00
|
|
|
|
2018-03-26 14:32:43 -07:00
|
|
|
type Props = {
|
2019-11-01 15:17:06 -04:00
|
|
|
fetchTransactions: (number, number) => void,
|
2018-03-26 14:32:43 -07:00
|
|
|
fetchingTransactions: boolean,
|
|
|
|
hasTransactions: boolean,
|
|
|
|
transactions: Array<Transaction>,
|
|
|
|
};
|
|
|
|
|
|
|
|
class TransactionListRecent extends React.PureComponent<Props> {
|
|
|
|
componentDidMount() {
|
2019-11-01 13:27:01 -04:00
|
|
|
const { fetchTransactions } = this.props;
|
2018-11-07 14:35:47 -05:00
|
|
|
|
2019-11-01 15:17:06 -04:00
|
|
|
fetchTransactions(1, TX_LIST.LATEST_PAGE_SIZE);
|
2017-08-20 17:42:00 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
render() {
|
2019-06-17 16:32:38 -04:00
|
|
|
const { transactions } = this.props;
|
2017-08-20 17:42:00 -04:00
|
|
|
return (
|
2019-07-21 17:31:22 -04:00
|
|
|
<section className="card">
|
2019-06-17 16:32:38 -04:00
|
|
|
<TransactionList
|
|
|
|
slim
|
2019-11-01 13:27:01 -04:00
|
|
|
title={__('Latest Transactions')}
|
2019-06-17 16:32:38 -04:00
|
|
|
transactions={transactions}
|
2019-11-01 13:27:01 -04:00
|
|
|
emptyMessage={__("Looks like you don't have any transactions.")}
|
2019-06-17 16:32:38 -04:00
|
|
|
/>
|
2017-08-20 17:42:00 -04:00
|
|
|
</section>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default TransactionListRecent;
|