lbry-desktop/ui/component/claimInsufficientCredits/view.jsx

38 lines
1.1 KiB
React
Raw Normal View History

// @flow
import * as React from 'react';
import Button from 'component/button';
import I18nMessage from 'component/i18nMessage';
2020-09-02 22:08:37 +02:00
import LbcSymbol from 'component/common/lbc-symbol';
type Props = {
uri: string,
fileInfo: FileListItem,
isInsufficientCredits: boolean,
claimWasPurchased: boolean,
};
function ClaimInsufficientCredits(props: Props) {
2020-05-21 17:38:28 +02:00
const { isInsufficientCredits, fileInfo, claimWasPurchased } = props;
2020-05-21 17:38:28 +02:00
if (fileInfo || !isInsufficientCredits || claimWasPurchased) {
return null;
}
return (
<div className="media__insufficient-credits help--warning">
<I18nMessage
tokens={{
reward_link: <Button button="link" navigate="/$/rewards" label={__('Rewards')} />,
2020-06-24 20:37:21 +02:00
buy_link: <Button button="link" navigate="/$/buy" label={__('buy')} />,
2020-09-02 22:08:37 +02:00
lbc: <LbcSymbol />,
}}
>
2020-09-02 22:08:37 +02:00
The publisher has chosen to charge %lbc% to view this content. Your balance is currently too low to view it.
Check out %reward_link% for free %lbc% or send more %lbc% to your wallet. You can also %buy_link% more %lbc%.
</I18nMessage>
</div>
);
}
export default ClaimInsufficientCredits;