lbry-desktop/ui/js/component/userVerify/view.jsx

66 lines
1.5 KiB
React
Raw Normal View History

2017-07-16 18:29:46 +02:00
import React from "react";
2017-08-03 01:37:38 +02:00
import Link from "component/link";
2017-07-19 01:00:13 +02:00
import CardVerify from "component/cardVerify";
import lbryio from "lbryio.js";
2017-07-16 18:29:46 +02:00
class UserVerify extends React.PureComponent {
constructor(props) {
super(props);
this.state = {
code: "",
};
}
handleCodeChanged(event) {
this.setState({
code: event.target.value,
});
}
2017-07-19 01:00:13 +02:00
onToken(data) {
this.props.verifyUserIdentity(data.id);
2017-07-16 18:29:46 +02:00
}
render() {
2017-08-03 01:37:38 +02:00
const { errorMessage, isPending, navigate } = this.props;
2017-07-16 18:29:46 +02:00
return (
2017-07-19 01:00:13 +02:00
<div>
2017-07-28 03:13:12 +02:00
<p>
{__(
2017-08-03 01:37:38 +02:00
"To ensure you are a real person, we require a valid credit or debit card."
2017-08-08 11:36:14 +02:00
) +
" " +
__("There is no charge at all, now or in the future.") +
" "}
<Link
href="https://lbry.io/faq/identity-requirements"
label={__("Read More")}
/>
2017-07-28 03:13:12 +02:00
</p>
2017-07-19 01:00:13 +02:00
{errorMessage && <p className="form-field__error">{errorMessage}</p>}
2017-08-03 01:37:38 +02:00
<p>
2017-08-08 11:36:14 +02:00
<CardVerify
label={__("Link Card and Finish")}
disabled={isPending}
token={this.onToken.bind(this)}
stripeKey={lbryio.getStripeToken()}
2017-08-08 11:36:14 +02:00
/>
2017-08-03 01:37:38 +02:00
</p>
2017-08-08 11:36:14 +02:00
<p>
{__(
"You can continue without this step, but you will not be eligible to earn rewards."
)}
</p>
<Link
onClick={() => navigate("/discover")}
button="alt"
label={__("Skip Rewards")}
/>
2017-07-19 01:00:13 +02:00
</div>
2017-07-16 18:29:46 +02:00
);
}
}
export default UserVerify;