<commit_before>import React from 'react';
import Claim from 'Components/Claim/Claim';
import { Router, Link, Route } from 'react-router-dom';

/* The Search Results
 * This is the parent component for the search results list
 */

export default class SearchResults extends React.Component {

	constructor(props) {
		super(props)
		this.handleClick = this.handleClick.bind(this);
	}

	handleClick(resultObject) {
		//currently - do nothing!
	}

	render() {
		if (typeof this.props.search_results == 'undefined') {
			console.warn('Search result props undefined :(');
			return null;
		}

		let searchResults = this.props.search_results.map(function (search_result, index) {
			return (
				<Link to={`/claim/${search_result.id}`} key={index} className="search-results__result">
					<Claim claim={search_result} handleClick={this.handleClick} isSelected={false} />
				</Link>
			);
		}.bind(this));

		return (
			<div className="search-results">
				{searchResults}
			</div>
		);
	}
}<commit_msg>tidying search results<commit_after>import React from 'react';
import Claim from 'Components/Claim/Claim';
import { Router, Link, Route } from 'react-router-dom';

/* The Search Results
 * This is the parent component for the search results list
 */

export default class SearchResults extends React.Component {
  constructor(props) {
    super(props);
    this.handleClick = this.handleClick.bind(this);
  }

  render() {
    if (typeof this.props.searchResults === 'undefined') {
      return null;
    }

    const searchResults = this.props.searchResults.map(searchResult => (
      <Link to={`/claim/${searchResult.id}`} key={searchResult.id} className="search-results__result">
        <Claim claim={searchResult} isSelected={false} />
      </Link>
    ));

    return (
      <div className="search-results">
        {searchResults}
      </div>
    );
  }
}

SearchResults.propTypes = {
  searchResults: React.PropTypes.arrayOf(React.PropTypes.object).isRequired,
};

{'fraction_non_alphanumeric': 0.13677811550151975, 'fraction_numerical': 0.0, 'mean_word_length': 3.7936893203883497, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 14, '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': '6605541', 'n_tokens_mistral': 626, 'n_tokens_neox': 584, 'n_words': 138}