mirror of
https://github.com/LBRYFoundation/lbry-desktop.git
synced 2025-09-21 02:19:44 +00:00
update invite reward check, fix infinite reward loop
This commit is contained in:
parent
7b41c199b2
commit
cac00028c4
2 changed files with 21 additions and 15 deletions
|
@ -47,9 +47,9 @@ class InviteList extends React.PureComponent {
|
||||||
<td className="text-center">
|
<td className="text-center">
|
||||||
{invitee.invite_reward_claimed
|
{invitee.invite_reward_claimed
|
||||||
? <Icon icon="icon-check" />
|
? <Icon icon="icon-check" />
|
||||||
: invitee.invite_accepted
|
: invitee.invite_reward_claimable
|
||||||
? <RewardLink
|
? <RewardLink
|
||||||
label={__("Claim")}
|
label={__("claim")}
|
||||||
reward_type={rewards.TYPE_REFERRAL}
|
reward_type={rewards.TYPE_REFERRAL}
|
||||||
/>
|
/>
|
||||||
: <span className="empty">
|
: <span className="empty">
|
||||||
|
|
|
@ -6,21 +6,27 @@ import SubHeader from "component/subHeader";
|
||||||
import Link from "component/link";
|
import Link from "component/link";
|
||||||
|
|
||||||
class RewardsPage extends React.PureComponent {
|
class RewardsPage extends React.PureComponent {
|
||||||
componentDidMount() {
|
/*
|
||||||
this.fetchRewards(this.props);
|
Below is broken for users who have claimed all rewards.
|
||||||
}
|
|
||||||
|
|
||||||
componentWillReceiveProps(nextProps) {
|
It can safely be disabled since we fetch all rewards after authentication, but should be re-enabled once fixed.
|
||||||
this.fetchRewards(nextProps);
|
|
||||||
}
|
|
||||||
|
|
||||||
fetchRewards(props) {
|
*/
|
||||||
const { fetching, rewards, fetchRewards } = props;
|
// componentDidMount() {
|
||||||
|
// this.fetchRewards(this.props);
|
||||||
if (!fetching && (!rewards || !rewards.length)) {
|
// }
|
||||||
fetchRewards();
|
//
|
||||||
}
|
// componentWillReceiveProps(nextProps) {
|
||||||
}
|
// this.fetchRewards(nextProps);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// fetchRewards(props) {
|
||||||
|
// const { fetching, rewards, fetchRewards } = props;
|
||||||
|
//
|
||||||
|
// if (!fetching && (!rewards || !rewards.length)) {
|
||||||
|
// fetchRewards();
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
renderPageHeader() {
|
renderPageHeader() {
|
||||||
const { doAuth, navigate, user } = this.props;
|
const { doAuth, navigate, user } = this.props;
|
||||||
|
|
Loading…
Add table
Reference in a new issue