lbry-desktop/src/renderer/component/rewardSummary/view.jsx

40 lines
1.1 KiB
React
Raw Normal View History

2017-12-12 00:50:22 +01:00
// @flow
import React from 'react';
import Link from 'component/link';
import { CreditAmount } from 'component/common';
2017-08-20 23:42:00 +02:00
2017-12-12 00:50:22 +01:00
type Props = {
unclaimedRewardAmount: number,
2017-12-12 21:49:50 +01:00
};
2017-12-12 00:50:22 +01:00
const RewardSummary = (props: Props) => {
const { unclaimedRewardAmount } = props;
2017-08-20 23:42:00 +02:00
return (
<section className="card">
<div className="card__title-primary">
<h3>{__('Rewards')}</h3>
2018-02-28 05:36:49 +01:00
<p className="help">
{__('Read our')}{' '}
<Link href="https://lbry.io/faq/rewards">{__('FAQ')}</Link>{' '}{__('to learn more about LBRY Rewards')}.
</p>
2017-08-20 23:42:00 +02:00
</div>
<div className="card__content">
{unclaimedRewardAmount > 0 ? (
2017-08-20 23:42:00 +02:00
<p>
{__('You have')} <CreditAmount amount={unclaimedRewardAmount} precision={8} />{' '}
{__('in unclaimed rewards')}.
2017-11-24 15:31:05 +01:00
</p>
) : (
<p>{__('There are no rewards available at this time, please check back later')}.</p>
2017-11-24 15:31:05 +01:00
)}
2017-08-20 23:42:00 +02:00
</div>
2017-10-09 07:10:56 +02:00
<div className="card__actions">
<Link button="primary" navigate="/rewards" label={__('Claim Rewards')} />
2017-08-20 23:42:00 +02:00
</div>
</section>
);
};
export default RewardSummary;