Merge pull request #847 from lbryio/empty-rewards

show empty rewards message on overview page
This commit is contained in:
Liam Cardenas 2017-12-11 20:58:09 -08:00 committed by GitHub
commit 348aed4b2f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,9 +1,14 @@
// @flow
import React from "react";
import Link from "component/link";
import { CreditAmount } from "component/common";
const RewardSummary = props => {
const { balance, unclaimedRewardAmount } = props;
type Props = {
unclaimedRewardAmount: number,
}
const RewardSummary = (props: Props) => {
const { unclaimedRewardAmount } = props;
return (
<section className="card">
@ -11,12 +16,14 @@ const RewardSummary = props => {
<h3>{__("Rewards")}</h3>
</div>
<div className="card__content">
{unclaimedRewardAmount > 0 && (
{unclaimedRewardAmount > 0 ? (
<p>
You have{" "}
<CreditAmount amount={unclaimedRewardAmount} precision={8} /> in
unclaimed rewards.
{__("You have")}{" "}
<CreditAmount amount={unclaimedRewardAmount} precision={8} />
{" "}{__("in unclaimed rewards")}.
</p>
) : (
<p>{__("There are no rewards available at this time, please check back later")}.</p>
)}
</div>
<div className="card__actions">