Merge pull request #847 from lbryio/empty-rewards
show empty rewards message on overview page
This commit is contained in:
commit
348aed4b2f
1 changed files with 13 additions and 6 deletions
|
@ -1,9 +1,14 @@
|
||||||
|
// @flow
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import Link from "component/link";
|
import Link from "component/link";
|
||||||
import { CreditAmount } from "component/common";
|
import { CreditAmount } from "component/common";
|
||||||
|
|
||||||
const RewardSummary = props => {
|
type Props = {
|
||||||
const { balance, unclaimedRewardAmount } = props;
|
unclaimedRewardAmount: number,
|
||||||
|
}
|
||||||
|
|
||||||
|
const RewardSummary = (props: Props) => {
|
||||||
|
const { unclaimedRewardAmount } = props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section className="card">
|
<section className="card">
|
||||||
|
@ -11,12 +16,14 @@ const RewardSummary = props => {
|
||||||
<h3>{__("Rewards")}</h3>
|
<h3>{__("Rewards")}</h3>
|
||||||
</div>
|
</div>
|
||||||
<div className="card__content">
|
<div className="card__content">
|
||||||
{unclaimedRewardAmount > 0 && (
|
{unclaimedRewardAmount > 0 ? (
|
||||||
<p>
|
<p>
|
||||||
You have{" "}
|
{__("You have")}{" "}
|
||||||
<CreditAmount amount={unclaimedRewardAmount} precision={8} /> in
|
<CreditAmount amount={unclaimedRewardAmount} precision={8} />
|
||||||
unclaimed rewards.
|
{" "}{__("in unclaimed rewards")}.
|
||||||
</p>
|
</p>
|
||||||
|
) : (
|
||||||
|
<p>{__("There are no rewards available at this time, please check back later")}.</p>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="card__actions">
|
<div className="card__actions">
|
||||||
|
|
Loading…
Reference in a new issue