<commit_before>// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

import _ from 'underscore';
import React from 'react';
import { FormatTemplate, MatchFilter } from './utils.jsx';
import { Filter } from './dispatch.jsx';

export default class LinksPanel extends React.Component {
  render() {
    return (
      <div>
        {this.props.links.map(function(link) {
          return <Link match={link.match} url={link.url} text={link.text} />
        }.bind(this))}
      </div>
    );
  }
}
LinksPanel.propTypes = {
  links: React.PropTypes.array.isRequired,
}

class Link extends React.Component {
  constructor(props) {
    super(props);
    this.state = {};
    this._update = this._update.bind(this);
  }
  componentWillMount() {
    Filter.onUpdate(this._update);
  }
  componentWillUnmount() {
    Filter.offUpdate(this._update);
  }
  _update() {
    this.setState({});
  }
  render() {<commit_msg>Add missing key prop in LinksPanel rendering.<commit_after>// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

import _ from 'underscore';
import React from 'react';
import { FormatTemplate, MatchFilter } from './utils.jsx';
import { Filter } from './dispatch.jsx';

export default class LinksPanel extends React.Component {
  render() {
    return (
      <div>
        {this.props.links.map(function(link, index) {
          return <Link key={index} match={link.match} url={link.url} text={link.text} />
        }.bind(this))}
      </div>
    );
  }
}
LinksPanel.propTypes = {
  links: React.PropTypes.array.isRequired,
}

class Link extends React.Component {
  constructor(props) {
    super(props);
    this.state = {};
    this._update = this._update.bind(this);
  }
  componentWillMount() {
    Filter.onUpdate(this._update);
  }
  componentWillUnmount() {
    Filter.offUpdate(this._update);
  }
  _update() {
    this.setState({});
  }
  render() {
{'fraction_non_alphanumeric': 0.1432791728212703, 'fraction_numerical': 0.0019694731659281144, 'mean_word_length': 3.215767634854772, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '3773200', 'n_tokens_mistral': 631, 'n_tokens_neox': 623, 'n_words': 156}