minor flow tweak for grandfathered users

This commit is contained in:
Jeremy Kauffman 2017-07-25 14:34:28 -04:00
parent 6e08fd6888
commit 85468c350c
2 changed files with 49 additions and 44 deletions

View file

@ -19,7 +19,7 @@ export class AuthPage extends React.PureComponent {
!isPending &&
user &&
user.has_verified_email &&
user.is_identity_verified
(user.is_reward_approved || user.is_identity_verified)
) {
props.navigate(props.pathAfterAuth);
}
@ -32,7 +32,7 @@ export class AuthPage extends React.PureComponent {
return __("Welcome to LBRY");
} else if (user && !user.has_verified_email) {
return __("Confirm Email");
} else if (user && !user.is_identity_verified) {
} else if (user && !user.is_identity_verified && !user.is_reward_approved) {
return __("Confirm Identity");
} else {
return __("Welcome to LBRY");

View file

@ -71,52 +71,57 @@ class RewardsPage extends React.PureComponent {
);
}
if (
user &&
(!user.primary_email ||
if (user && !user.is_reward_approved) {
if (
!user.primary_email ||
!user.has_verified_email ||
!user.is_identity_verified)
) {
cardHeader = (
<div>
<div className="card__content empty">
<p>{__("Only verified accounts are eligible to earn rewards.")}</p>
!user.is_identity_verified
) {
cardHeader = (
<div>
<div className="card__content empty">
<p>
{__("Only verified accounts are eligible to earn rewards.")}
</p>
</div>
<div className="card__content">
<Link onClick={doAuth} button="primary" label="Become Verified" />
</div>
</div>
);
} else {
cardHeader = (
<div className="card__content">
<Link onClick={doAuth} button="primary" label="Become Verified" />
</div>
</div>
);
} else if (user && !user.is_reward_approved) {
cardHeader = (
<div className="card__content">
<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>
{__(
"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>
<p>
{__("You will receive an email when this process is complete.") +
" " +
__("Please enjoy free content in the meantime!")}
</p>
<p>
<Link
onClick={() => navigate("/discover")}
button="primary"
label="Return Home"
/>
</p>
</div>
);
<p>
{__(
"We apologize for this inconvenience, but have added this additional step to prevent fraud."
)}
</p>
<p>
{__("You will receive an email when this process is complete.") +
" " +
__("Please enjoy free content in the meantime!")}
</p>
<p>
<Link
onClick={() => navigate("/discover")}
button="primary"
label="Return Home"
/>
</p>
</div>
);
}
}
return (