lbry-desktop/src/ui/component/transactionListRecent/view.jsx

37 lines
872 B
React
Raw Normal View History

2018-03-26 23:32:43 +02:00
// @flow
2019-06-17 22:32:38 +02:00
import React from 'react';
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>,
fetchMyClaims: () => void,
2018-03-26 23:32:43 +02:00
};
class TransactionListRecent extends React.PureComponent<Props> {
componentDidMount() {
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;