lbry-desktop/ui/component/transactionList/index.js

35 lines
1 KiB
JavaScript
Raw Normal View History

import { connect } from 'react-redux';
2018-09-24 05:44:42 +02:00
import { selectClaimedRewardsByTransactionId } from 'lbryinc';
import { doOpenModal } from 'redux/actions/app';
import {
selectAllMyClaimsByOutpoint,
2019-05-14 06:52:51 +02:00
selectSupportsByOutpoint,
selectTransactionListFilter,
doSetTransactionListFilter,
2019-06-17 22:32:38 +02:00
selectIsFetchingTransactions,
2020-02-14 18:44:51 +01:00
selectTransactionItems,
} from 'lbry-redux';
2019-09-23 04:47:07 +02:00
import { withRouter } from 'react-router';
import TransactionList from './view';
const select = state => ({
rewards: selectClaimedRewardsByTransactionId(state),
2019-05-14 06:52:51 +02:00
mySupports: selectSupportsByOutpoint(state),
myClaims: selectAllMyClaimsByOutpoint(state),
2018-10-18 19:56:10 +02:00
filterSetting: selectTransactionListFilter(state),
2019-06-17 22:32:38 +02:00
loading: selectIsFetchingTransactions(state),
2020-02-14 18:44:51 +01:00
allTransactions: selectTransactionItems(state),
});
const perform = dispatch => ({
openModal: (modal, props) => dispatch(doOpenModal(modal, props)),
2018-10-18 19:56:10 +02:00
setTransactionFilter: filterSetting => dispatch(doSetTransactionListFilter(filterSetting)),
});
2019-09-23 04:47:07 +02:00
export default withRouter(
connect(
select,
perform
)(TransactionList)
);