<commit_before>import React, { PropTypes } from 'react';

export default React.createClass({
  propTypes: {
    cart: PropTypes.object,
    updateCount: PropTypes.func.isRequired,
    removeProduct: PropTypes.func.isRequired,
    buy: PropTypes.func.isRequired,
  },
  renderVariant(variant) {
    const { updateCount, removeProduct, buy } = this.props;
    function handleQuantity(event) {
      console.log(event.target.value);
      return updateCount(variant, event.target.value);
    }
    return (
      <li key={variant.sku}>
        {variant.sku},
        KRW {variant.price.KRW}
        <input type="number" name="quantity" min="1" max="100" onChange={handleQuantity} defaultValue={variant.count}/>
        <button onClick={removeProduct}>Remove</button>
        <button onClick={buy}>Buy this item</button>
      </li>
    );
  },
  render() {
    const { cart, checkout } = this.props;
    console.log('child');
    console.log(cart);
    if (!cart) {
      return (
        <div>Error! No Cart</div>
      );
    }
    const variants = cart.productVariants || [];
    return (
      <div className="container">
        <div className="cart-title-box">
          Your Cart
        </div>
        <div className="cart-top-box">
          <a><span className="cart-continue-shopping-arrow"></span><span className="cart-continue-shopping-text">Continue Shopping</span></a>
        </div>
        <div className="cart-seller-box">
          Seller:
        </div>
        <ul>
          {variants.map(this.renderVariant)}
        </ul>
        <button onClick={checkout}>Buy All</button>
      </div>
    );
  },
});<commit_msg>remove console.log<commit_after>import React, { PropTypes } from 'react';

export default React.createClass({
  propTypes: {
    cart: PropTypes.object,
    updateCount: PropTypes.func.isRequired,
    removeProduct: PropTypes.func.isRequired,
    buy: PropTypes.func.isRequired,
  },
  renderVariant(variant) {
    const { updateCount, removeProduct, buy } = this.props;
    function handleQuantity(event) {
      return updateCount(variant, event.target.value);
    }
    return (
      <li key={variant.sku}>
        {variant.sku},
        KRW {variant.price.KRW}
        <input type="number" name="quantity" min="1" max="100" onChange={handleQuantity} defaultValue={variant.count}/>
        <button onClick={removeProduct}>Remove</button>
        <button onClick={buy}>Buy this item</button>
      </li>
    );
  },
  render() {
    const { cart, checkout } = this.props;
    if (!cart) {
      return (
        <div>Error! No Cart</div>
      );
    }
    const variants = cart.productVariants || [];
    return (
      <div className="container">
        <div className="cart-title-box">
          Your Cart
        </div>
        <div className="cart-top-box">
          <a><span className="cart-continue-shopping-arrow"></span><span className="cart-continue-shopping-text">Continue Shopping</span></a>
        </div>
        <div className="cart-seller-box">
          Seller:
        </div>
        <ul>
          {variants.map(this.renderVariant)}
        </ul>
        <button onClick={checkout}>Buy All</button>
      </div>
    );
  },
});
{'fraction_non_alphanumeric': 0.152276295133438, 'fraction_numerical': 0.002511773940345369, 'mean_word_length': 2.551839464882943, 'pattern_counts': {'":': 0, '<': 57, '<?xml version=': 0, '>': 57, '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': '2737819', 'n_tokens_mistral': 968, 'n_tokens_neox': 961, 'n_words': 180}