2018-04-17 00:44:57 +02:00
|
|
|
// @flow
|
2018-11-26 02:21:25 +01:00
|
|
|
import * as ICONS from 'constants/icons';
|
2018-04-17 00:44:57 +02:00
|
|
|
import * as React from 'react';
|
2018-03-26 23:32:43 +02:00
|
|
|
import Button from 'component/button';
|
2017-12-21 22:08:54 +01:00
|
|
|
import CardVerify from 'component/cardVerify';
|
2018-10-04 21:27:49 +02:00
|
|
|
import { Lbryio } from 'lbryinc';
|
2017-07-16 18:29:46 +02:00
|
|
|
|
2018-04-17 00:44:57 +02:00
|
|
|
type Props = {
|
|
|
|
errorMessage: ?string,
|
|
|
|
isPending: boolean,
|
|
|
|
navigate: string => void,
|
|
|
|
verifyUserIdentity: string => void,
|
|
|
|
verifyPhone: () => void,
|
|
|
|
};
|
2017-07-16 18:29:46 +02:00
|
|
|
|
2018-04-17 00:44:57 +02:00
|
|
|
class UserVerify extends React.PureComponent<Props> {
|
|
|
|
constructor() {
|
|
|
|
super();
|
2017-07-16 18:29:46 +02:00
|
|
|
|
2018-04-17 00:44:57 +02:00
|
|
|
(this: any).onToken = this.onToken.bind(this);
|
2017-07-16 18:29:46 +02:00
|
|
|
}
|
|
|
|
|
2018-04-17 00:44:57 +02:00
|
|
|
onToken(data: { id: string }) {
|
2017-07-19 01:00:13 +02:00
|
|
|
this.props.verifyUserIdentity(data.id);
|
2017-07-16 18:29:46 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
render() {
|
2018-04-17 00:44:57 +02:00
|
|
|
const { errorMessage, isPending, navigate, verifyPhone } = this.props;
|
2017-07-16 18:29:46 +02:00
|
|
|
return (
|
2018-03-26 23:32:43 +02:00
|
|
|
<React.Fragment>
|
|
|
|
<section className="card card--section">
|
|
|
|
<div className="card__title">
|
2017-12-21 22:08:54 +01:00
|
|
|
<h1>{__('Final Human Proof')}</h1>
|
2017-08-26 05:21:26 +02:00
|
|
|
</div>
|
|
|
|
<div className="card__content">
|
|
|
|
<p>
|
2017-12-21 22:08:54 +01:00
|
|
|
Finally, please complete <strong>one and only one</strong> of the options below.
|
2017-08-26 05:21:26 +02:00
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</section>
|
2018-03-26 23:32:43 +02:00
|
|
|
<section className="card card--section">
|
2018-04-17 00:44:57 +02:00
|
|
|
<div className="card__title">{__('1) Proof via Credit')}</div>
|
|
|
|
<p className="card__content">
|
2017-12-21 22:08:54 +01:00
|
|
|
{`${__(
|
|
|
|
'If you have a valid credit or debit card, you can use it to instantly prove your humanity.'
|
2018-11-26 02:21:25 +01:00
|
|
|
)} ${__(
|
|
|
|
'LBRY does not store your credit card information. There is no charge at all for this, now or in the future.'
|
|
|
|
)} `}
|
2018-04-17 00:44:57 +02:00
|
|
|
</p>
|
2017-08-30 00:17:54 +02:00
|
|
|
<div className="card__actions">
|
2017-12-21 22:08:54 +01:00
|
|
|
{errorMessage && <p className="form-field__error">{errorMessage}</p>}
|
2017-08-30 00:17:54 +02:00
|
|
|
<CardVerify
|
2017-12-21 22:08:54 +01:00
|
|
|
label={__('Perform Card Verification')}
|
2017-08-30 00:17:54 +02:00
|
|
|
disabled={isPending}
|
2018-04-17 00:44:57 +02:00
|
|
|
token={this.onToken}
|
2018-09-24 05:44:42 +02:00
|
|
|
stripeKey={Lbryio.getStripeToken()}
|
2017-08-30 00:17:54 +02:00
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
<div className="card__content">
|
|
|
|
<div className="meta">
|
2017-12-21 22:08:54 +01:00
|
|
|
{__('A $1 authorization may temporarily appear with your provider.')}{' '}
|
2018-03-26 23:32:43 +02:00
|
|
|
<Button
|
2018-04-05 23:26:20 +02:00
|
|
|
button="link"
|
2017-08-26 05:21:26 +02:00
|
|
|
href="https://lbry.io/faq/identity-requirements"
|
2017-12-21 22:08:54 +01:00
|
|
|
label={__('Read more about why we do this.')}
|
2017-08-26 05:21:26 +02:00
|
|
|
/>
|
2017-08-30 00:17:54 +02:00
|
|
|
</div>
|
2017-08-26 05:21:26 +02:00
|
|
|
</div>
|
|
|
|
</section>
|
2018-03-26 23:32:43 +02:00
|
|
|
<section className="card card--section">
|
2018-04-17 00:44:57 +02:00
|
|
|
<div className="card__title">{__('2) Proof via Phone')}</div>
|
|
|
|
<p className="card__content">
|
2018-01-11 06:41:51 +01:00
|
|
|
{`${__(
|
|
|
|
'You will receive an SMS text message confirming that your phone number is correct.'
|
|
|
|
)}`}
|
2018-04-17 00:44:57 +02:00
|
|
|
</p>
|
2018-01-11 06:41:51 +01:00
|
|
|
<div className="card__actions">
|
2018-03-26 23:32:43 +02:00
|
|
|
<Button
|
2018-01-15 14:32:01 +01:00
|
|
|
onClick={() => {
|
|
|
|
verifyPhone();
|
|
|
|
}}
|
2018-04-05 23:26:20 +02:00
|
|
|
button="primary"
|
2018-11-26 02:21:25 +01:00
|
|
|
icon={ICONS.PHONE}
|
2018-01-11 06:41:51 +01:00
|
|
|
label={__('Submit Phone Number')}
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
<div className="card__content">
|
2018-01-29 20:22:40 +01:00
|
|
|
<div className="meta">
|
|
|
|
{__('Standard messaging rates apply. Having trouble?')}{' '}
|
2018-04-05 23:26:20 +02:00
|
|
|
<Button button="link" href="https://lbry.io/faq/phone" label={__('Read more.')} />
|
2018-01-29 20:22:40 +01:00
|
|
|
</div>
|
2018-01-11 06:41:51 +01:00
|
|
|
</div>
|
|
|
|
</section>
|
2018-04-05 23:26:20 +02:00
|
|
|
<section className="card card--section">
|
2018-04-17 00:44:57 +02:00
|
|
|
<div className="card__title">{__('3) Proof via Chat')}</div>
|
2017-08-26 05:21:26 +02:00
|
|
|
<div className="card__content">
|
|
|
|
<p>
|
|
|
|
{__(
|
2017-12-21 22:08:54 +01:00
|
|
|
'A moderator capable of approving you is typically available in the #verification channel of our chat room.'
|
2017-08-26 05:21:26 +02:00
|
|
|
)}
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
{__(
|
2017-12-21 22:08:54 +01:00
|
|
|
'This process will likely involve providing proof of a stable and established online or real-life identity.'
|
2017-08-26 05:21:26 +02:00
|
|
|
)}
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
<div className="card__actions">
|
2018-03-26 23:32:43 +02:00
|
|
|
<Button
|
2017-10-25 23:45:47 +02:00
|
|
|
href="https://chat.lbry.io"
|
2018-04-05 23:26:20 +02:00
|
|
|
button="primary"
|
2018-11-26 02:21:25 +01:00
|
|
|
icon={ICONS.MESSAGE}
|
2017-12-21 22:08:54 +01:00
|
|
|
label={__('Join LBRY Chat')}
|
2017-08-26 05:21:26 +02:00
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</section>
|
2018-03-26 23:32:43 +02:00
|
|
|
<section className="card card--section">
|
2018-04-17 00:44:57 +02:00
|
|
|
<div className="card__title">{__('Or, Skip It Entirely')}</div>
|
|
|
|
<p className="card__content">
|
|
|
|
{__(
|
|
|
|
'You can continue without this step, but you will not be eligible to earn rewards.'
|
|
|
|
)}
|
|
|
|
</p>
|
2017-08-26 05:21:26 +02:00
|
|
|
<div className="card__actions">
|
2018-04-17 00:44:57 +02:00
|
|
|
<Button
|
|
|
|
onClick={() => navigate('/discover')}
|
|
|
|
button="primary"
|
|
|
|
label={__('Skip Rewards')}
|
|
|
|
/>
|
2017-08-26 05:21:26 +02:00
|
|
|
</div>
|
|
|
|
</section>
|
2018-03-26 23:32:43 +02:00
|
|
|
</React.Fragment>
|
2017-07-16 18:29:46 +02:00
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default UserVerify;
|