only show reward intro for non identity_verified users
This commit is contained in:
parent
09f04b46dc
commit
300b0c7c95
2 changed files with 27 additions and 18 deletions
|
@ -64,6 +64,7 @@ function UserSignIn(props: Props) {
|
||||||
const [hasSeenFollowList, setHasSeenFollowList] = usePersistedState('channel-follow-intro', false);
|
const [hasSeenFollowList, setHasSeenFollowList] = usePersistedState('channel-follow-intro', false);
|
||||||
const hasVerifiedEmail = user && user.has_verified_email;
|
const hasVerifiedEmail = user && user.has_verified_email;
|
||||||
const rewardsApproved = user && user.is_reward_approved;
|
const rewardsApproved = user && user.is_reward_approved;
|
||||||
|
const isIdentityVerified = user && user.is_identity_verified;
|
||||||
const hasFetchedReward = useFetched(claimingReward);
|
const hasFetchedReward = useFetched(claimingReward);
|
||||||
const channelCount = channels ? channels.length : 0;
|
const channelCount = channels ? channels.length : 0;
|
||||||
const hasClaimedEmailAward = claimedRewards.some(reward => reward.reward_type === REWARDS.TYPE_CONFIRM_EMAIL);
|
const hasClaimedEmailAward = claimedRewards.some(reward => reward.reward_type === REWARDS.TYPE_CONFIRM_EMAIL);
|
||||||
|
@ -80,7 +81,7 @@ function UserSignIn(props: Props) {
|
||||||
// The possible screens for the sign in flow
|
// The possible screens for the sign in flow
|
||||||
const showEmail = !emailToVerify && !hasVerifiedEmail;
|
const showEmail = !emailToVerify && !hasVerifiedEmail;
|
||||||
const showEmailVerification = emailToVerify && !hasVerifiedEmail;
|
const showEmailVerification = emailToVerify && !hasVerifiedEmail;
|
||||||
const showUserVerification = hasVerifiedEmail && !rewardsApproved;
|
const showUserVerification = hasVerifiedEmail && !rewardsApproved && !isIdentityVerified;
|
||||||
const showSyncPassword = syncEnabled && getSyncError;
|
const showSyncPassword = syncEnabled && getSyncError;
|
||||||
const showChannelCreation =
|
const showChannelCreation =
|
||||||
hasVerifiedEmail &&
|
hasVerifiedEmail &&
|
||||||
|
|
|
@ -42,24 +42,32 @@ class RewardsPage extends PureComponent<Props> {
|
||||||
if (!user.primary_email || !user.has_verified_email || !user.is_identity_verified) {
|
if (!user.primary_email || !user.has_verified_email || !user.is_identity_verified) {
|
||||||
return <RewardAuthIntro />;
|
return <RewardAuthIntro />;
|
||||||
}
|
}
|
||||||
return (
|
|
||||||
<section className="card card--section">
|
|
||||||
<p>
|
|
||||||
{__('This account must undergo review before you can participate in the rewards program.')}{' '}
|
|
||||||
{__('This can take anywhere from several minutes to several days.')}
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>{__('We apologize for this inconvenience, but have added this additional step to prevent fraud.')}</p>
|
return (
|
||||||
<p>
|
<Card
|
||||||
{`${__('If you continue to see this message, send us an email to help@lbry.com.')} ${__(
|
title={__('Reward Validation Pending')}
|
||||||
'Please enjoy free content in the meantime!'
|
body={
|
||||||
)}`}
|
<React.Fragment>
|
||||||
</p>
|
<p>
|
||||||
<div className="card__actions">
|
{__('This account must undergo review before you can participate in the rewards program.')}{' '}
|
||||||
<Button navigate="/" button="primary" label="Return Home" />
|
{__('This can take anywhere from several minutes to several days.')}
|
||||||
<Button onClick={() => fetchUser()} button="link" label="Refresh" />
|
</p>
|
||||||
</div>
|
|
||||||
</section>
|
<p>{__('We apologize for this inconvenience, but have added this additional step to prevent fraud.')}</p>
|
||||||
|
<p>
|
||||||
|
{`${__('If you continue to see this message, send us an email to help@lbry.com.')} ${__(
|
||||||
|
'Please enjoy free content in the meantime!'
|
||||||
|
)}`}
|
||||||
|
</p>
|
||||||
|
</React.Fragment>
|
||||||
|
}
|
||||||
|
actions={
|
||||||
|
<div className="section__actions">
|
||||||
|
<Button navigate="/" button="primary" label="Return Home" />
|
||||||
|
<Button onClick={() => fetchUser()} button="link" label="Refresh" />
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue