<commit_before>import React, { Component } from 'react';
import PropTypes from 'prop-types';

class EventTitle extends Component {

  static propTypes = {
    baseURL: PropTypes.string.isRequired,
    title: PropTypes.string,
    bgImage: PropTypes.string,
  }

  static defaultProps = {
    title: 'ซื้อเครื่องดื่ม/ขนม',
    bgImage: 'images/product-full.png',
  }

  render() {
    const { title, baseURL, bgImage } = this.props;
    return (
      <div className="promotion-title">
        <div className="_center">
          <h1>{title}</h1>
        </div>
        <div className="event-detail">
          <div className="box">
            <div className="ribbon-less ribbon-one-blue">
              <p><span>เติมเงินฟรี<br />
                5 บาท</span></p>
            </div>
            <div className="photo-item"><img src="images/product-1.png" />
              <div className="price"><span>35</span> <b>฿</b></div>
            </div>
            <div className="requirements">
              <p>1. ใส่ <span className="color-orange">เบอร์มือถือ <img className="icon middle-line" src="images/icon-phone.png" height="60" /></span></p>
              <p>2. ชมโฆษณา 15 วินาที</p>
              <p>3. <span className="color-red">เติมเงินฟรี 5 บาท</span> ทาง SMS</p>
            </div>
          </div>
        </div>
      </div>
    );
  }
}

export default EventTitle;
<commit_msg>Using EventItem to render<commit_after>import React, { Component } from 'react';
import PropTypes from 'prop-types';
import cuid from 'cuid';

import EventItem from '../EventItem';

class EventTitle extends Component {
  static propTypes = {
    baseURL: PropTypes.string.isRequired,
    title: PropTypes.string,
    item: PropTypes.shape({}),
  };

  static defaultProps = {
    title: 'ซื้อเครื่องดื่ม/ขนม',
    bgImage: 'images/product-full.png',
    item: {},
  };

  render() {
    const { title, baseURL, item } = this.props;
    return (
      <div className="promotion-title">
        <div className="_center">
          <h1>{title}</h1>
        </div>
        <div className="event-detail">
          <EventItem
            key={cuid()}
            baseURL={baseURL}
            item={item}
            handleClick={() => console.log('')}
            hasButton={false}
          />;
        </div>
      </div>
    );
  }
}

export default EventTitle;

{'fraction_non_alphanumeric': 0.1635434412265758, 'fraction_numerical': 0.0068143100511073255, 'mean_word_length': 2.209016393442623, 'pattern_counts': {'":': 0, '<': 51, '<?xml version=': 0, '>': 52, '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': '4918715', 'n_tokens_mistral': 790, 'n_tokens_neox': 806, 'n_words': 154}