<commit_before>// @flow
import * as ICONS from 'constants/icons';
import React, { Fragment } from 'react';
import Button from 'component/button';
import CardVerify from 'component/cardVerify';
import { Lbryio } from 'lbryinc';
import Card from 'component/common/card';
import I18nMessage from 'component/i18nMessage';

type Props = {
  errorMessage: ?string,
  isPending: boolean,
  verifyUserIdentity: string => void,
  verifyPhone: () => void,
  fetchUser: () => void,
  skipLink?: string,
  onSkip: () => void,
};

class UserVerify extends React.PureComponent<Props> {
  constructor() {
    super();

    (this: any).onToken = this.onToken.bind(this);
  }

  onToken(data: { id: string }) {
    this.props.verifyUserIdentity(data.id);
  }

  render() {
    const { errorMessage, isPending, verifyPhone, fetchUser, onSkip } = this.props;
    const skipButtonProps = {
      onClick: onSkip,
    };

    return (
      <React.Fragment>
        <section className="section__header">
          <h1 className="section__title--large">{__('Rewards Validation')}</h1>
          <p>
            <I18nMessage
              tokens={{
                rewards_program: (
                  <Button button="link" label={__('Rewards Program')} href="https://lbry.com/faq/rewards" />
                ),
                Refresh: <Button onClick={() => fetchUser()} button="link" label={__('Refresh')} />,
                Skip: <Button {...skipButtonProps} button="link" label={__('Skip')} />,
              }}
            >
              If you'd like to participate our %rewards_program% to earn credits, please complete one of the steps below
              to be validated. %Refresh% or %Skip%.
            </I18nMessage>
          </p>
          <p>{__('This step is not required to use LBRY, and not all users or regions may qualify.')}</p>
        </section>

        <div className="section">
          <Card
            icon={ICONS.PHONE}
            title={__('Proof via Text')}
            subtitle={__(
              'You will receive an SMS text message confirming that your phone number is correct. Does not work for Canada and possibly other regions'
            )}
            actions={
              <Fragment>
                <Button
                  onClick={() => {
                    verifyPhone();<commit_msg>adjust account validation text<commit_after>// @flow
import * as ICONS from 'constants/icons';
import React, { Fragment } from 'react';
import Button from 'component/button';
import CardVerify from 'component/cardVerify';
import { Lbryio } from 'lbryinc';
import Card from 'component/common/card';
import I18nMessage from 'component/i18nMessage';

type Props = {
  errorMessage: ?string,
  isPending: boolean,
  verifyUserIdentity: string => void,
  verifyPhone: () => void,
  fetchUser: () => void,
  skipLink?: string,
  onSkip: () => void,
};

class UserVerify extends React.PureComponent<Props> {
  constructor() {
    super();

    (this: any).onToken = this.onToken.bind(this);
  }

  onToken(data: { id: string }) {
    this.props.verifyUserIdentity(data.id);
  }

  render() {
    const { errorMessage, isPending, verifyPhone, fetchUser, onSkip } = this.props;
    const skipButtonProps = {
      onClick: onSkip,
    };

    return (
      <React.Fragment>
        <section className="section__header">
          <h1 className="section__title--large">{__('Get Validated')}</h1>
          <p>
            <I18nMessage
              tokens={{
                rewards_program: (
                  <Button button="link" label={__('other rewards')} href="https://lbry.com/faq/rewards" />
                ),
                Refresh: <Button onClick={() => fetchUser()} button="link" label={__('Refresh')} />,
                Skip: <Button {...skipButtonProps} button="link" label={__('Skip')} />,
              }}
            >
              Validated accounts can earn for views and are eligible for %rewards_program%. Please complete one of the steps below. %Refresh% or %Skip%.
            </I18nMessage>
          </p>
          <p>{__('This step is not required to use LBRY, and not all users or regions may qualify.')}</p>
        </section>

        <div className="section">
          <Card
            icon={ICONS.PHONE}
            title={__('Proof via Text')}
            subtitle={__(
              'You will receive an SMS text message confirming that your phone number is correct. Does not work for Canada and possibly other regions'
            )}
            actions={
              <Fragment>
                <Button
                  onClick={() => {
                    verifyPhone();
{'fraction_non_alphanumeric': 0.13046300302899178, 'fraction_numerical': 0.004327131112072695, 'mean_word_length': 2.230607966457023, 'pattern_counts': {'":': 0, '<': 41, '<?xml version=': 0, '>': 49, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4990057', 'n_tokens_mistral': 1305, 'n_tokens_neox': 1283, 'n_words': 358}