0c042376a4
Required lbryinc changes that I pushed to master.
15 lines
580 B
JavaScript
15 lines
580 B
JavaScript
import { connect } from 'react-redux';
|
|
import { makeSelectRewardByClaimCode, makeSelectIsRewardClaimPending, doClaimRewardType } from 'lbryinc';
|
|
import RewardLink from './view';
|
|
|
|
const select = (state, props) => ({
|
|
isPending: makeSelectIsRewardClaimPending()(state, props),
|
|
reward: makeSelectRewardByClaimCode()(state, props.claim_code),
|
|
});
|
|
|
|
const perform = dispatch => ({
|
|
claimReward: reward =>
|
|
dispatch(doClaimRewardType(reward.reward_type, { notifyError: true, params: { claim_code: reward.claim_code } })),
|
|
});
|
|
|
|
export default connect(select, perform)(RewardLink);
|