<commit_before>import React from 'react';

export default function CustomReviewField({ children, uiSchema }) {
  let selectQuestionTitle = '';

  function whichSelectQuestions(term) {
    return children.props.name.includes(term);
  }
  switch (true) {
    case whichSelectQuestions('EMPLOYMENT_STATUS'):
      selectQuestionTitle = 'Employment status';
      break;
    case whichSelectQuestions('HEALTH_HISTORY'):
      selectQuestionTitle = 'Health history';
      break;
    case whichSelectQuestions('TRANSPORTATION'):
      selectQuestionTitle = 'Transportation';
      break;
    case whichSelectQuestions('VETERAN'):
      selectQuestionTitle = 'Relationship to the VA';
      break;
    case whichSelectQuestions('GENDER'):
      selectQuestionTitle = 'Gender';
      break;
    case whichSelectQuestions('RACE_ETHNICITY_ORIGIN'):
      selectQuestionTitle = 'Race, ethnicity, and origin';
      break;
    default:
      selectQuestionTitle = '';
  }

  return children?.props.formData ? (
    <div>
      <div className="review-row">
        <dt>{selectQuestionTitle}:</dt>
        <dd>{uiSchema['ui:title']}</dd>
      </div>
    </div>
  ) : (
    ''
  );
}<commit_msg>fix bug with ethnicity labels on review screen (#14398)<commit_after>import React from 'react';

export default function CustomReviewField({ children, uiSchema }) {
  let selectQuestionTitle = '';

  function whichSelectQuestions(term) {
    return children.props.name.includes(term);
  }
  switch (true) {
    case whichSelectQuestions('EMPLOYMENT_STATUS'):
      selectQuestionTitle = 'Employment status';
      break;
    case whichSelectQuestions('HEALTH_HISTORY'):
      selectQuestionTitle = 'Health history';
      break;
    case whichSelectQuestions('TRANSPORTATION'):
      selectQuestionTitle = 'Transportation';
      break;
    case whichSelectQuestions('VETERAN'):
      selectQuestionTitle = 'Relationship to the VA';
      break;
    case whichSelectQuestions('GENDER'):
      selectQuestionTitle = 'Gender';
      break;
    case whichSelectQuestions('RACE_ETHNICITY'):
      selectQuestionTitle = 'Race, ethnicity, and origin';
      break;
    default:
      selectQuestionTitle = '';
  }

  return children?.props.formData ? (
    <div>
      <div className="review-row">
        <dt>{selectQuestionTitle}:</dt>
        <dd>{uiSchema['ui:title']}</dd>
      </div>
    </div>
  ) : (
    ''
  );
}
{'fraction_non_alphanumeric': 0.12130054189245519, 'fraction_numerical': 0.0020842017507294707, 'mean_word_length': 3.387568555758684, 'pattern_counts': {'":': 0, '<': 19, '<?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': '4741679', 'n_tokens_mistral': 705, 'n_tokens_neox': 671, 'n_words': 142}