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

52 lines
1.4 KiB
React
Raw Normal View History

2017-07-16 18:29:46 +02:00
import React from "react";
2017-07-19 01:00:13 +02:00
import { CreditAmount } from "component/common";
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";
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."
) + " " + __("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><CardVerify
2017-07-19 01:00:13 +02:00
label={__("Link Card and Finish")}
disabled={isPending}
token={this.onToken.bind(this)}
2017-07-22 00:13:13 +02:00
stripeKey="pk_live_e8M4dRNnCCbmpZzduEUZBgJO"
2017-08-03 01:37:38 +02:00
/></p>
<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;