<commit_before>import React from 'react';
import { connect } from 'react-redux';
import { Link } from 'react-router';

import { estimatedBenefits } from '../../selectors/estimator';
import { formatCurrency, locationInfo } from '../../utils/helpers';
import {
  renderCautionAlert,
  renderSchoolClosingAlert,
} from '../../utils/render';

export class SearchResult extends React.Component {
  estimate = ({ qualifier, value }) => {
    if (qualifier === '% of instate tuition') {
      return <span>{value}% in-state</span>;
    } else if (qualifier === null) {
      return value;
    }
    return <span>{formatCurrency(value)}</span>;
  };

  render() {
    const {
      version,
      schoolClosing,
      schoolClosingOn,
      estimated,
      facilityCode,
      name,
      city,
      state,
      country,
      studentCount,
      cautionFlags,
    } = this.props;

    const tuition = this.estimate(estimated.tuition);
    const housing = this.estimate(estimated.housing);
    const books = this.estimate(estimated.books);
    const linkTo = {
      pathname: `profile/${facilityCode}`,
      query: version ? { version } : {},
    };

    return (
      <div id={`search-result-${facilityCode}`} className="search-result">
        <div className="outer">
          <div className="inner">
            <div className="row">
              <div className="small-12 usa-width-seven-twelfths medium-7 columns">
                <h2>
                  <Link
                    to={linkTo}
                    aria-label={`${name} ${locationInfo(city, state, country)}`}
                  >
                    {name}
                  </Link>
                </h2>
              </div>
            </div><commit_msg>CT: Which GI Bill benefit do you want to use? (Learn more) resets to Post-9/11 on profile page#8228 (#12525)<commit_after>import React from 'react';
import { connect } from 'react-redux';
import { Link } from 'react-router';
import environment from 'platform/utilities/environment';
import { estimatedBenefits } from '../../selectors/estimator';
import { formatCurrency, locationInfo } from '../../utils/helpers';
import {
  renderCautionAlert,
  renderSchoolClosingAlert,
} from '../../utils/render';

export class SearchResult extends React.Component {
  estimate = ({ qualifier, value }) => {
    if (qualifier === '% of instate tuition') {
      return <span>{value}% in-state</span>;
    } else if (qualifier === null) {
      return value;
    }
    return <span>{formatCurrency(value)}</span>;
  };

  render() {
    const {
      version,
      schoolClosing,
      schoolClosingOn,
      estimated,
      facilityCode,
      name,
      city,
      state,
      country,
      studentCount,
      cautionFlags,
    } = this.props;

    const tuition = this.estimate(estimated.tuition);
    const housing = this.estimate(estimated.housing);
    const books = this.estimate(estimated.books);

    const linkTo = {
      pathname: environment.isProduction()
        ? `profile/${facilityCode}`
        : `/profile/${facilityCode}`,
      query: version ? { version } : {},
    };

    return (
      <div id={`search-result-${facilityCode}`} className="search-result">
        <div className="outer">
          <div className="inner">
            <div className="row">
              <div className="small-12 usa-width-seven-twelfths medium-7 columns">
                <h2>
                  <Link
                    to={linkTo}
                    aria-label={`${name} ${locationInfo(city, state, country)}`}
                  >
                    {name}
                  </Link>
                </h2>
              </div>
            </div>
{'fraction_non_alphanumeric': 0.14021236046828206, 'fraction_numerical': 0.005989654233596515, 'mean_word_length': 2.0873949579831934, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 35, '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': '5896641', 'n_tokens_mistral': 1065, 'n_tokens_neox': 1041, 'n_words': 237}