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