fix: multiple youtube channel reward
This commit is contained in:
parent
6cd5048572
commit
cc5751617c
4 changed files with 8 additions and 10 deletions
|
@ -131,7 +131,7 @@
|
|||
"json-loader": "^0.5.4",
|
||||
"lbry-format": "https://github.com/lbryio/lbry-format.git",
|
||||
"lbry-redux": "lbryio/lbry-redux#db0f48b56f80d556b7774f0a70d32d16f07ccdcc",
|
||||
"lbryinc": "lbryio/lbryinc#e2bba80797e412f17d092b0964ff252a337bdbd2",
|
||||
"lbryinc": "lbryio/lbryinc#402a9a199f0bcb4cf6bd25a4ee1fb98e30b48187",
|
||||
"lint-staged": "^7.0.2",
|
||||
"localforage": "^1.7.1",
|
||||
"lodash-es": "^4.17.14",
|
||||
|
|
|
@ -1,17 +1,14 @@
|
|||
import { connect } from 'react-redux';
|
||||
import { makeSelectRewardByType, makeSelectIsRewardClaimPending, doClaimRewardType } from 'lbryinc';
|
||||
import { makeSelectRewardByClaimCode, makeSelectIsRewardClaimPending, doClaimRewardType } from 'lbryinc';
|
||||
import RewardLink from './view';
|
||||
|
||||
const select = (state, props) => ({
|
||||
isPending: makeSelectIsRewardClaimPending()(state, props),
|
||||
reward: makeSelectRewardByType()(state, props.reward_type),
|
||||
reward: makeSelectRewardByClaimCode()(state, props.claim_code),
|
||||
});
|
||||
|
||||
const perform = dispatch => ({
|
||||
claimReward: reward => dispatch(doClaimRewardType(reward.reward_type, { notifyError: true })),
|
||||
});
|
||||
|
||||
export default connect(
|
||||
select,
|
||||
perform
|
||||
)(RewardLink);
|
||||
export default connect(select, perform)(RewardLink);
|
||||
|
|
|
@ -19,6 +19,7 @@ type Props = {
|
|||
created_at: string,
|
||||
reward_description: string,
|
||||
reward_type: string,
|
||||
claim_code: string,
|
||||
},
|
||||
user: User,
|
||||
};
|
||||
|
@ -57,7 +58,7 @@ const RewardTile = (props: Props) => {
|
|||
<Icon icon={ICONS.COMPLETED} /> {__('Reward claimed.')}
|
||||
</span>
|
||||
) : (
|
||||
<RewardLink button reward_type={reward.reward_type} />
|
||||
<RewardLink button claim_code={reward.claim_code} />
|
||||
))}
|
||||
</div>
|
||||
}
|
||||
|
|
|
@ -6146,9 +6146,9 @@ lbry-redux@lbryio/lbry-redux#db0f48b56f80d556b7774f0a70d32d16f07ccdcc:
|
|||
reselect "^3.0.0"
|
||||
uuid "^3.3.2"
|
||||
|
||||
lbryinc@lbryio/lbryinc#e2bba80797e412f17d092b0964ff252a337bdbd2:
|
||||
lbryinc@lbryio/lbryinc#402a9a199f0bcb4cf6bd25a4ee1fb98e30b48187:
|
||||
version "0.0.1"
|
||||
resolved "https://codeload.github.com/lbryio/lbryinc/tar.gz/e2bba80797e412f17d092b0964ff252a337bdbd2"
|
||||
resolved "https://codeload.github.com/lbryio/lbryinc/tar.gz/402a9a199f0bcb4cf6bd25a4ee1fb98e30b48187"
|
||||
dependencies:
|
||||
reselect "^3.0.0"
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue