lbry-desktop/ui/js/page/transactionHistory/view.jsx

41 lines
1.1 KiB
React
Raw Normal View History

import React from "react";
2017-08-20 23:42:00 +02:00
import { BusyMessage } from "component/common";
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;
2017-08-20 23:42:00 +02:00
return (
<main className="main--single-column">
<SubHeader />
<section className="card">
<div
className={
"card__title-primary " +
(fetchingTransactions && transactions.length ? "reloading" : "")
}
>
2017-08-20 23:42:00 +02:00
<h3>{__("Transaction History")}</h3>
</div>
<div className="card__content">
{fetchingTransactions && !transactions.length
? <BusyMessage message={__("Loading transactions")} />
: ""}
{transactions && transactions.length
? <TransactionList transactions={transactions} />
: ""}
2017-08-20 23:42:00 +02:00
</div>
</section>
</main>
);
}
}
export default TransactionHistoryPage;