<commit_before>import React from "react";
import PropTypes from "../proptypes";

var EventTags = React.createClass({
  propTypes: {
    group: PropTypes.Group.isRequired,
    event: PropTypes.Event.isRequired
  },

  render() {
    var children = [];
    var value;
    for (var key in this.props.event.tags) {
      value = this.props.event.tags[key];
      children.push(
        <li key={key}>
          {key} = {value}
        </li>
      );
    }

    return (
      <div id="tags" className="box">
        <div className="box-header">
          <h3>Tags</h3>
        </div>
        <div className="box-content with-padding">
          <ul className="mini-tag-list">
            {children}
          </ul>
        </div>
      </div>
    );
  }
});

export default EventTags;

<commit_msg>Dont render event tags when empty<commit_after>import React from "react";
import PropTypes from "../proptypes";

var EventTags = React.createClass({
  propTypes: {
    group: PropTypes.Group.isRequired,
    event: PropTypes.Event.isRequired
  },

  render() {
    var children = [];
    var value;
    for (var key in this.props.event.tags) {
      value = this.props.event.tags[key];
      children.push(
        <li key={key}>
          {key} = {value}
        </li>
      );
    }

    if (children.length === 0) {
      return null;
    }

    return (
      <div id="tags" className="box">
        <div className="box-header">
          <h3>Tags</h3>
        </div>
        <div className="box-content with-padding">
          <ul className="mini-tag-list">
            {children}
          </ul>
        </div>
      </div>
    );
  }
});

export default EventTags;


{'fraction_non_alphanumeric': 0.15056988602279545, 'fraction_numerical': 0.002999400119976005, 'mean_word_length': 1.9263157894736842, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 27, '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': '2009334', 'n_tokens_mistral': 530, 'n_tokens_neox': 528, 'n_words': 118}