<commit_before>import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';

import { revealForm, setFormValues, sendFeedback, clearError } from '../actions';
import DefaultView from '../components/DefaultView';
import FeedbackForm from '../components/FeedbackForm';
import FeedbackSubmitted from '../components/FeedbackSubmitted';

function Main(props) {
  let content = null;

  if (props.feedbackReceived) {
    content = <FeedbackSubmitted {...props}/>;
  } else if (props.formIsVisible) {
    content = <FeedbackForm {...props}/>;
  } else {
    content = <DefaultView {...props}/>;
  }

  return (
    <div className="feedback-widget">
      <div className="row">{content}</div>
    </div>
  );
}

const mapStateToProps = (state) => state.feedback;

const mapDispatchToProps = {
  setFormValues,
  revealForm,
  sendFeedback,
  clearError
};

Main.propTypes = {
  formValues: PropTypes.object.isRequired,
  formErrors: PropTypes.object.isRequired,
  formIsSubmittable: PropTypes.bool,
  requestPending: PropTypes.bool,
  feedbackReceived: PropTypes.bool,
  shouldSendResponse: PropTypes.bool,
  setFormValues: PropTypes.func.isRequired,
  revealForm: PropTypes.func.isRequired,
  sendFeedback: PropTypes.func.isRequired,
  clearError: PropTypes.func.isRequired,
  errorMessage: PropTypes.object
};

export default connect(mapStateToProps, mapDispatchToProps)(Main);

export { Main };
<commit_msg>Disable feedback on VIC (#7074)<commit_after>import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';

import { revealForm, setFormValues, sendFeedback, clearError } from '../actions';
import DefaultView from '../components/DefaultView';
import FeedbackForm from '../components/FeedbackForm';
import FeedbackSubmitted from '../components/FeedbackSubmitted';

const veteranIdCard = '/veteran-id-card/';

function Main(props) {
  if (document.location.pathname === veteranIdCard) return null;

  let content = null;

  if (props.feedbackReceived) {
    content = <FeedbackSubmitted {...props}/>;
  } else if (props.formIsVisible) {
    content = <FeedbackForm {...props}/>;
  } else {
    content = <DefaultView {...props}/>;
  }

  return (
    <div className="feedback-widget">
      <div className="row">{content}</div>
    </div>
  );
}

const mapStateToProps = (state) => state.feedback;

const mapDispatchToProps = {
  setFormValues,
  revealForm,
  sendFeedback,
  clearError
};

Main.propTypes = {
  formValues: PropTypes.object.isRequired,
  formErrors: PropTypes.object.isRequired,
  formIsSubmittable: PropTypes.bool,
  requestPending: PropTypes.bool,
  feedbackReceived: PropTypes.bool,
  shouldSendResponse: PropTypes.bool,
  setFormValues: PropTypes.func.isRequired,
  revealForm: PropTypes.func.isRequired,
  sendFeedback: PropTypes.func.isRequired,
  clearError: PropTypes.func.isRequired,
  errorMessage: PropTypes.object
};

export default connect(mapStateToProps, mapDispatchToProps)(Main);

export { Main };

{'fraction_non_alphanumeric': 0.12840079628400797, 'fraction_numerical': 0.0013271400132714001, 'mean_word_length': 4.614525139664805, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 19, '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': '5198630', 'n_tokens_mistral': 914, 'n_tokens_neox': 918, 'n_words': 204}