mirror of
https://github.com/LBRYFoundation/lbry-desktop.git
synced 2025-08-26 23:13:29 +00:00
14 lines
533 B
JavaScript
14 lines
533 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 })),
|
|
});
|
|
|
|
export default connect(select, perform)(RewardLink);
|