<commit_before>import React from 'react';
import PropTypes from 'prop-types';

export default class Vet360TransactionPending extends React.Component {
  static propTypes = {
    title: PropTypes.string,
    refreshTransaction: PropTypes.func.isRequired,
  };

  componentDidMount() {
    this.interval = window.setInterval(this.props.refreshTransaction, 1000);
  }

  componentWillUnmount() {
    window.clearInterval(this.interval);
  }

  render() {
    if (this.props.children) {
      return <div>{this.props.children}</div>;
    }

    let content = (
      <span>
        We’re working on saving your new {this.props.title.toLowerCase()}. We’ll
        show it here once it’s saved.
      </span>
    );

    if (this.props.method === 'DELETE') {
      content = (
        <span>
          We’re in the process of deleting your {this.props.title.toLowerCase()}
          . We’ll remove this information soon.
        </span>
      );
    }

    return (
      <div
        data-transaction-pending
        className="vet360-profile-field-transaction-pending"
      >
        {content}
      </div>
    );
  }
}<commit_msg>2442 Added text alert preference to transaction pending message (#10920)<commit_after>import React from 'react';
import PropTypes from 'prop-types';

import environment from 'platform/utilities/environment';

export default class Vet360TransactionPending extends React.Component {
  static propTypes = {
    title: PropTypes.string,
    refreshTransaction: PropTypes.func.isRequired,
  };

  componentDidMount() {
    this.interval = window.setInterval(this.props.refreshTransaction, 1000);
  }

  componentWillUnmount() {
    window.clearInterval(this.interval);
  }

  render() {
    if (this.props.children) {
      return <div>{this.props.children}</div>;
    }

    let content = (
      <span>
        We’re working on saving your new {this.props.title.toLowerCase()}. We’ll
        show it here once it’s saved.
      </span>
    );

    if (
      !environment.isProduction() &&
      this.props.title.toLowerCase() === 'mobile phone number'
    ) {
      content = (
        <span>
          We’re working on saving your new {this.props.title.toLowerCase()} and
          text alert preference. They will show on your profile once they've
          been updated.
        </span>
      );
    }

    if (this.props.method === 'DELETE') {
      content = (
        <span>
          We’re in the process of deleting your {this.props.title.toLowerCase()}
          . We’ll remove this information soon.
        </span>
      );
    }

    return (
      <div
        data-transaction-pending
        className="vet360-profile-field-transaction-pending"
      >
        {content}
      </div>
    );
  }
}
{'fraction_non_alphanumeric': 0.11764705882352941, 'fraction_numerical': 0.010595542564852027, 'mean_word_length': 2.3677736777367775, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 0, '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': '6745281', 'n_tokens_mistral': 807, 'n_tokens_neox': 787, 'n_words': 191}