<commit_before>import React, { Component, PropTypes } from 'react';
import './Notification.css';

const propTypes = {
  errorMessages: PropTypes.array.isRequired
}

export default class Notification extends Component {

  render() {
    return ( 
      <div className="Notification">
      { this.getErrorMessages() }
      </div>
    );
  }

  getErrorMessages() {
    const { errorMessages } = this.props;
    let messages = null;

    messages = errorMessages.length > 0 && errorMessages.map((message, index) => {
      return (
        <p className="Notification-Item" key={index} >{ message }</p>
      )
    });

    return messages;
  }
}

Notification.propTypes = propTypes;<commit_msg>Refactor Notification structure and add PropTypes<commit_after>import React, { Component, PropTypes } from 'react';
import './Notification.css';

const propTypes = {
  errorMessages: PropTypes.array.isRequired
}

export default class Notification extends Component {
  renderErrorMessages() {
    const { errorMessages } = this.props;
    let messages = null;

    messages = errorMessages.length > 0 && errorMessages.map((message, index) => {
      return (
        <p className="Notification-Item" key={index} >{ message }</p>
      )
    });

    return messages;
  }

  render() {
    return ( 
      <div className="Notification">
      { this.renderErrorMessages() }
      </div>
    );
  }
}

Notification.propTypes = propTypes;
{'fraction_non_alphanumeric': 0.12736179146256124, 'fraction_numerical': 0.0013995801259622112, 'mean_word_length': 3.121037463976945, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 15, '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': '5711852', 'n_tokens_mistral': 407, 'n_tokens_neox': 396, 'n_words': 96}