lbry-desktop/src/renderer/component/rewardSummary/index.js

21 lines
633 B
JavaScript
Raw Normal View History

import { connect } from 'react-redux';
import { selectUnclaimedRewardValue, selectFetchingRewards } from 'redux/selectors/rewards';
import { doRewardList } from 'redux/actions/rewards';
import { doFetchRewardedContent } from 'redux/actions/content';
import RewardSummary from './view';
2017-08-20 23:42:00 +02:00
const select = state => ({
unclaimedRewardAmount: selectUnclaimedRewardValue(state),
fetching: selectFetchingRewards(state),
2017-08-20 23:42:00 +02:00
});
const perform = dispatch => ({
fetchRewards: () => dispatch(doRewardList()),
fetchRewardedContent: () => dispatch(doFetchRewardedContent()),
});
export default connect(
select,
perform
)(RewardSummary);