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