2017-12-12 00:50:22 +01:00
|
|
|
// @flow
|
2017-12-21 22:08:54 +01:00
|
|
|
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">
|
2017-12-21 22:08:54 +01:00
|
|
|
<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">
|
2017-12-11 23:06:33 +01:00
|
|
|
{unclaimedRewardAmount > 0 ? (
|
2017-08-20 23:42:00 +02:00
|
|
|
<p>
|
2017-12-21 22:08:54 +01:00
|
|
|
{__('You have')} <CreditAmount amount={unclaimedRewardAmount} precision={8} />{' '}
|
|
|
|
{__('in unclaimed rewards')}.
|
2017-11-24 15:31:05 +01:00
|
|
|
</p>
|
2017-12-11 23:06:33 +01:00
|
|
|
) : (
|
2017-12-21 22:08:54 +01:00
|
|
|
<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">
|
2017-12-21 22:08:54 +01:00
|
|
|
<Link button="primary" navigate="/rewards" label={__('Claim Rewards')} />
|
2017-08-20 23:42:00 +02:00
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export default RewardSummary;
|