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

39 lines
910 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;
2019-06-27 08:18:45 +02:00
// @if TARGET='app'
fetchMyClaims();
fetchTransactions();
2019-06-27 08:18:45 +02:00
// @endif
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;