<commit_before>import React from 'react';
import OrderActions from '../../actions/orderActions';

const LoadMoreButton = React.createClass({
  loadMoreOrders: () => {
    OrderActions.loadOrders();
  },

  render() {
    return (
      <a className="btn btn-default" onClick={this.loadMoreOrders} role="button">Load More</a>
    );
  }
});

const OrderItem = React.createClass({
  propTypes: {
    title : React.PropTypes.string
  },

  getDefaultProps: () => {
    return { title: "Order" }
  },

  render() {

    return (
      <div className="panel panel-default">
        <div className="panel-heading">
          <h3 className="panel-title">{this.props.title}</h3>
        </div>
        <div className="panel-body">
          {this.props.content}
        </div>
      </div>
    );
  }
});

const OrdersList = (props) => {
  let items = props.items.map(item => <OrderItem {...item} key={item.id} />),
      loading = props.loading ? <div className="loading-label">Loading...</div> : '';

  return (
    <div>
      <ul>
        {items}
      </ul>
      {loading}
      <LoadMoreButton />
    </div>
  );                               
};

OrdersList.propTypes = {
  loading : React.PropTypes.bool,
  items : React.PropTypes.array
}

export default OrdersList;<commit_msg>add disabled prop to order loading button<commit_after>import React from 'react';
import OrderActions from '../../actions/orderActions';

const LoadMoreButton = React.createClass({
  propTypes: {
    loading : React.PropTypes.bool
  },

  loadMoreOrders: () => {
    OrderActions.loadOrders();
  },

  render() {
    return (
      <a className="btn btn-default" disabled={this.props.loading} onClick={this.loadMoreOrders}
      role="button">Load More</a>
    );
  }
});

const OrderItem = React.createClass({
  propTypes: {
    title : React.PropTypes.string
  },

  getDefaultProps: () => {
    return { title: "Order" }
  },

  render() {

    return (
      <div className="panel panel-default">
        <div className="panel-heading">
          <h3 className="panel-title">{this.props.title}</h3>
        </div>
        <div className="panel-body">
          {this.props.content}
        </div>
      </div>
    );
  }
});

const OrdersList = (props) => {
  let items = props.items.map(item => <OrderItem {...item} key={item.id} />),
      loading = props.loading ? <div className="loading-label">Loading...</div> : '';

  return (
    <div>
      <ul>
        {items}
      </ul>
      {loading}
      <LoadMoreButton loading={props.loading} />
    </div>
  );
};

OrdersList.propTypes = {
  loading : React.PropTypes.bool,
  items : React.PropTypes.array
}

export default OrdersList;
{'fraction_non_alphanumeric': 0.16697865967802322, 'fraction_numerical': 0.001497566454511419, 'mean_word_length': 2.4882506527415145, 'pattern_counts': {'":': 0, '<': 39, '<?xml version=': 0, '>': 47, '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': '6878344', 'n_tokens_mistral': 854, 'n_tokens_neox': 840, 'n_words': 160}