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';
|
2017-08-20 23:42:00 +02:00
|
|
|
|
2018-03-26 23:32:43 +02:00
|
|
|
type Props = {
|
|
|
|
fetchTransactions: () => void,
|
|
|
|
fetchingTransactions: boolean,
|
|
|
|
hasTransactions: boolean,
|
|
|
|
transactions: Array<Transaction>,
|
2018-11-07 20:35:47 +01:00
|
|
|
fetchMyClaims: () => void,
|
2018-03-26 23:32:43 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
class TransactionListRecent extends React.PureComponent<Props> {
|
|
|
|
componentDidMount() {
|
2018-11-07 20:35:47 +01:00
|
|
|
const { fetchMyClaims, fetchTransactions } = this.props;
|
|
|
|
|
|
|
|
fetchMyClaims();
|
|
|
|
fetchTransactions();
|
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-06-17 22:32:38 +02:00
|
|
|
<section className="card card__content">
|
|
|
|
<TransactionList
|
|
|
|
slim
|
|
|
|
title={__('Recent Transactions')}
|
|
|
|
transactions={transactions}
|
|
|
|
emptyMessage={__("Looks like you don't have any recent transactions.")}
|
|
|
|
/>
|
2017-08-20 23:42:00 +02:00
|
|
|
</section>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default TransactionListRecent;
|