2018-11-07 14:35:47 -05:00
|
|
|
// @flow
|
2017-12-21 18:08:54 -03:00
|
|
|
import React from 'react';
|
|
|
|
import TransactionList from 'component/transactionList';
|
2018-03-26 14:32:43 -07:00
|
|
|
import Page from 'component/page';
|
2017-08-18 23:08:01 -04:00
|
|
|
|
2018-11-07 14:35:47 -05:00
|
|
|
type Props = {
|
2019-11-01 15:17:06 -04:00
|
|
|
fetchTransactions: () => void,
|
2018-11-07 14:35:47 -05:00
|
|
|
fetchingTransactions: boolean,
|
2019-09-22 22:47:07 -04:00
|
|
|
filteredTransactionPage: Array<{}>,
|
|
|
|
filteredTransactionsCount: number,
|
2018-11-07 14:35:47 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
class TransactionHistoryPage 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();
|
2017-08-20 17:42:00 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
render() {
|
2019-09-22 22:47:07 -04:00
|
|
|
const { filteredTransactionPage, filteredTransactionsCount } = this.props;
|
2017-09-17 20:52:57 -04:00
|
|
|
|
2017-08-20 17:42:00 -04:00
|
|
|
return (
|
2018-03-26 14:32:43 -07:00
|
|
|
<Page>
|
2019-09-26 12:07:11 -04:00
|
|
|
<section className="card">
|
2019-09-22 22:47:07 -04:00
|
|
|
<TransactionList
|
|
|
|
transactions={filteredTransactionPage}
|
|
|
|
transactionCount={filteredTransactionsCount}
|
|
|
|
title={__('Transaction History')}
|
|
|
|
/>
|
2017-08-20 17:42:00 -04:00
|
|
|
</section>
|
2018-03-26 14:32:43 -07:00
|
|
|
</Page>
|
2017-08-20 17:42:00 -04:00
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
2017-08-18 23:08:01 -04:00
|
|
|
|
|
|
|
export default TransactionHistoryPage;
|