<commit_before>import React from 'react';

import { t } from "./Translations";

class ArticlesContainer extends React.Component {

  constructor(props){
    super(props);
  }

  renderPagination(){
    return (
      <div className="row text-center">
        <div className="col-sm-12">
          <ul className="pagination">
            <li><a href="">«</a></li>
            <li><a href="">»</a></li>
          </ul>
        </div>
      </div>
    );
  }

  render () {
    const { locale } = this.props;
    return (
      <div className="container">
        <div className="row">
          <div className="col-md-12">
            <h1 className="page-header"> Page header</h1>
          </div>
        </div>
        <div className="row">
          <div className="col-md-7">
            <img className="image-responsive" src="http://placehold.it/600x300"/>
            <a href="#"></a>
          </div>
          <div className="col-md-5">
            <h3> Project One</h3>
            <h4> Subheading </h4>
            <p>Subheading fdsjkvjsdv d sv kd jfkdlndsks kdsjdgldsgqslkgjqdklg kgjdkgqkdsljgkldsqgj kjqgkdlgjkldsgjdkgjlsqgjk</p>
            <a className="btn btn-primary" href="#">
              View project 
              <span className="glyphicon glyphicon-chevron-right"></span>
            </a>
          </div>
        </div>
        <hr/>
        <div className="row">
          <div className="col-md-7">
            <img className="image-responsive" src="http://placehold.it/600x300"/>
            <a href="#"></a>
          </div>
          <div className="col-md-5">
            <h3> Project Two</h3>
            <h4> Subheading </h4>
            <p>Subheading fdsjkvjsdv d sv kd jfkdlndsks kdsjdgldsgqslkgjqdklg kgjdkgqkdsljgkldsqgj kjqgkdlgjkldsgjdkgjlsqgjk</p>
            <a className="btn btn-primary" href="#">
              View project 
              <span className="glyphicon glyphicon-chevron-right"></span>
            </a>
          </div>
        </div>
        <hr/>
        
      </div>
    );
  }
}

export default ArticlesContainer;<commit_msg>use child element to fill articles container<commit_after>import React from 'react';

import { t } from "./Translations";
import Article from "./Article.react";

const nbArticles = 5;

class ArticlesContainer extends React.Component {

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

  renderPagination(){
    const { children } = this.props;
    const nodes = children.map((child, index) => {
      return (<li key={index}><a href="">{index+1}</a></li>);
    })
    return (
      <div className="row text-center">
        <div className="col-sm-12">
          <ul className="pagination">
            <li key="first"><a href="">«</a></li>
            {nodes}
            <li key="last"><a href="">»</a></li>
          </ul>
        </div>
      </div>
    );
  }

  renderChildren() {
    const { children } = this.props;
    return children.map((child, index) => {
      return (
        <span key={index}>
          {child}
          <hr/>
        </span>
      );
    });
  }

  render () {
    const { locale, title, children } = this.props;
    return (
      <div className="container">
        <div className="row">
          <div className="col-md-12">
            <h1 className="page-header">{title}</h1>
          </div>
        </div>
        {this.renderChildren()}
      </div>
    );
  }
}

ArticlesContainer.propTypes = {
  title: React.PropTypes.string
};

ArticlesContainer.defaultProps = {
  title: 'Page header'
};

export default ArticlesContainer;
{'fraction_non_alphanumeric': 0.1582244008714597, 'fraction_numerical': 0.010348583877995643, 'mean_word_length': 1.9861788617886178, 'pattern_counts': {'":': 0, '<': 94, '<?xml version=': 0, '>': 96, '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': '515153', 'n_tokens_mistral': 1202, 'n_tokens_neox': 1156, 'n_words': 241}