2017-08-19 05:08:01 +02:00
|
|
|
import React from "react";
|
2017-08-20 23:42:00 +02:00
|
|
|
import { BusyMessage } from "component/common";
|
2017-08-19 05:08:01 +02:00
|
|
|
import SubHeader from "component/subHeader";
|
|
|
|
import TransactionList from "component/transactionList";
|
|
|
|
|
2017-08-20 23:42:00 +02:00
|
|
|
class TransactionHistoryPage extends React.PureComponent {
|
|
|
|
componentWillMount() {
|
|
|
|
this.props.fetchTransactions();
|
|
|
|
}
|
|
|
|
|
|
|
|
render() {
|
|
|
|
const { fetchingTransactions, transactions } = this.props;
|
|
|
|
return (
|
|
|
|
<main className="main--single-column">
|
|
|
|
<SubHeader />
|
|
|
|
<section className="card">
|
|
|
|
<div className="card__title-primary">
|
|
|
|
<h3>{__("Transaction History")}</h3>
|
|
|
|
</div>
|
|
|
|
<div className="card__content">
|
|
|
|
{fetchingTransactions &&
|
|
|
|
<BusyMessage message={__("Loading transactions")} />}
|
|
|
|
{!fetchingTransactions &&
|
|
|
|
<TransactionList transactions={transactions} />}
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
</main>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
2017-08-19 05:08:01 +02:00
|
|
|
|
|
|
|
export default TransactionHistoryPage;
|