lbry-desktop/ui/js/modal/modalCreditIntro/view.jsx

67 lines
2.2 KiB
React
Raw Normal View History

import React from "react";
import { Modal } from "modal/modal";
2017-08-18 05:31:44 +02:00
import { CreditAmount, CurrencySymbol } from "component/common";
import Link from "component/link/index";
const ModalCreditIntro = props => {
const { closeModal, totalRewardValue, currentBalance, verifyAccount } = props;
const totalRewardRounded = Math.round(totalRewardValue / 10) * 10;
return (
<Modal type="custom" isOpen={true} contentLabel="Welcome to LBRY">
<section>
2017-08-26 05:21:26 +02:00
<h3 className="modal__header">{__("Blockchain 101")}</h3>
<p>
2017-08-26 05:21:26 +02:00
LBRY is controlled and powered by a blockchain asset called {" "}
<em><CurrencySymbol /></em>.{" "}
2017-08-21 05:38:34 +02:00
<CurrencySymbol />{" "}
{__(
"is used to publish content, to have a say in the network rules, and to access paid content."
)}
</p>
2017-08-21 05:38:34 +02:00
{currentBalance <= 0
2017-08-26 05:21:26 +02:00
? <div>
<p>
You currently have <CreditAmount amount={currentBalance} />, so
the actions you can take are limited.
</p>
<p>
However, there are a variety of ways to get credits, including
more than {" "}
{totalRewardValue
? <CreditAmount amount={totalRewardRounded} />
: <span className="credit-amount">{__("?? credits")}</span>}
{" "}{" "}
2017-08-21 05:38:34 +02:00
{__(
2017-08-26 05:21:26 +02:00
" in rewards available for being a proven human during the LBRY beta."
2017-08-21 05:38:34 +02:00
)}
2017-08-26 05:21:26 +02:00
</p>
</div>
: <div>
<p>
But you probably knew this, since you've already got{" "}
<CreditAmount amount={currentBalance} />.
</p>
</div>}
2017-08-21 05:38:34 +02:00
<div className="modal__buttons">
<Link
button="primary"
onClick={verifyAccount}
2017-08-26 05:21:26 +02:00
label={__("I'm Totally A Human")}
/>
2017-08-21 05:38:34 +02:00
<Link
button="alt"
onClick={closeModal}
label={
2017-08-26 05:21:26 +02:00
currentBalance <= 0 ? __("Use Without LBC") : __("Meh, Not Now")
2017-08-21 05:38:34 +02:00
}
/>
</div>
</section>
</Modal>
);
};
export default ModalCreditIntro;