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

52 lines
1.4 KiB
React
Raw Normal View History

2017-07-16 12:29:46 -04:00
import React from "react";
2017-07-18 19:00:13 -04:00
import { CreditAmount } from "component/common";
2017-08-02 19:37:38 -04:00
import Link from "component/link";
2017-07-18 19:00:13 -04:00
import CardVerify from "component/cardVerify";
2017-07-16 12:29:46 -04:00
class UserVerify extends React.PureComponent {
constructor(props) {
super(props);
this.state = {
code: "",
};
}
handleCodeChanged(event) {
this.setState({
code: event.target.value,
});
}
2017-07-18 19:00:13 -04:00
onToken(data) {
this.props.verifyUserIdentity(data.id);
2017-07-16 12:29:46 -04:00
}
render() {
2017-08-02 19:37:38 -04:00
const { errorMessage, isPending, navigate } = this.props;
2017-07-16 12:29:46 -04:00
return (
2017-07-18 19:00:13 -04:00
<div>
2017-07-27 21:13:12 -04:00
<p>
{__(
2017-08-02 19:37:38 -04: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-27 21:13:12 -04:00
</p>
2017-07-18 19:00:13 -04:00
{errorMessage && <p className="form-field__error">{errorMessage}</p>}
2017-08-02 19:37:38 -04:00
<p><CardVerify
2017-07-18 19:00:13 -04:00
label={__("Link Card and Finish")}
disabled={isPending}
token={this.onToken.bind(this)}
2017-07-21 18:13:13 -04:00
stripeKey="pk_live_e8M4dRNnCCbmpZzduEUZBgJO"
2017-08-02 19:37:38 -04: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-18 19:00:13 -04:00
</div>
2017-07-16 12:29:46 -04:00
);
}
}
export default UserVerify;