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

47 lines
1.2 KiB
React
Raw Normal View History

// @flow
import React from 'react';
import classnames from 'classnames';
import TransactionList from 'component/transactionList';
2018-03-26 23:32:43 +02:00
import Page from 'component/page';
import UnsupportedOnWeb from 'component/common/unsupported-on-web';
type Props = {
fetchMyClaims: () => void,
fetchTransactions: () => void,
fetchingTransactions: boolean,
2019-09-23 04:47:07 +02:00
filteredTransactionPage: Array<{}>,
filteredTransactionsCount: number,
};
class TransactionHistoryPage extends React.PureComponent<Props> {
componentDidMount() {
const { fetchMyClaims, fetchTransactions } = this.props;
fetchMyClaims();
fetchTransactions();
2017-08-20 23:42:00 +02:00
}
render() {
2019-09-23 04:47:07 +02:00
const { filteredTransactionPage, filteredTransactionsCount } = this.props;
2017-08-20 23:42:00 +02:00
return (
2018-03-26 23:32:43 +02:00
<Page>
{IS_WEB && <UnsupportedOnWeb />}
<section
2019-06-17 22:32:38 +02:00
className={classnames('card', {
'card--disabled': IS_WEB,
})}
>
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
);
}
}
export default TransactionHistoryPage;