<commit_before>import React from 'react';
import AlertActions from '../actions/alertActions';
import PureRenderMixin from 'react-addons-pure-render-mixin';
import {t} from '../locale';

const AlertMessage = React.createClass({
  propTypes: {
    className: React.PropTypes.string,
    id: React.PropTypes.number.isRequired,
    message: React.PropTypes.string.isRequired,
    type: React.PropTypes.string,
    url: React.PropTypes.string
  },

  mixins: [PureRenderMixin],

  closeAlert: function() {
    AlertActions.closeAlert(this.props.id);
  },

  render: function() {
    let className = this.props.className || 'alert';
    if (this.props.type !== '') {
      className += ' alert-' + this.props.type;
    }

    return (
      <div className={className}>
        <div className="container">
          <button type="button" className="close" aria-label={t('Close')}
                  onClick={this.closeAlert}>
            <span aria-hidden="true">&times;</span>
          </button>
          <span className="icon"></span>
          {this.props.url ? <a href={this.props.url}>{this.props.message}</a> : this.props.message}
        </div>
      </div><commit_msg>Minor JSX style change to AlertMessage.<commit_after>import React from 'react';
import AlertActions from '../actions/alertActions';
import PureRenderMixin from 'react-addons-pure-render-mixin';
import {t} from '../locale';

const AlertMessage = React.createClass({
  propTypes: {
    className: React.PropTypes.string,
    id: React.PropTypes.number.isRequired,
    message: React.PropTypes.string.isRequired,
    type: React.PropTypes.string,
    url: React.PropTypes.string
  },

  mixins: [PureRenderMixin],

  closeAlert: function() {
    AlertActions.closeAlert(this.props.id);
  },

  render: function() {
    let className = this.props.className || 'alert';
    if (this.props.type !== '') {
      className += ' alert-' + this.props.type;
    }

    return (
      <div className={className}>
        <div className="container">
          <button type="button" className="close" aria-label={t('Close')}
                  onClick={this.closeAlert}>
            <span aria-hidden="true">&times;</span>
          </button>
          <span className="icon"></span>
          {this.props.url
            ? <a href={this.props.url}>{this.props.message}</a>
            : this.props.message}
        </div>
      </div>
{'fraction_non_alphanumeric': 0.15606694560669457, 'fraction_numerical': 0.0, 'mean_word_length': 2.837881219903692, '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': '6342717', 'n_tokens_mistral': 725, 'n_tokens_neox': 703, 'n_words': 138}