<commit_before>import React from 'react';
import ReactDOM from 'react-dom';

export default class LINEButton extends React.Component {
  static propTypes = {
    image: React.PropTypes.string,
    text: React.PropTypes.string,
  };

  constructor(props) {
    super(props);
    this.state = ({
      imageURL: '',
      height: '',
      width: '',
    });
  }

  componentDidMount() {
    if (this.props.image == '20x20') {
      this.setState({
        imageURL: 'http://i.imgur.com/voMN0NH.png',
        height: 20,
        width: 20,
      });
    } else if (this.props.image == '30x30') {
      this.setState({
        imageURL: 'http://i.imgur.com/Lkq9vFO.png',
        height: 30,
        width: 30,
      });
    } else if (this.props.image == '36x60') {
      this.setState({
        imageURL: 'http://i.imgur.com/5sEp1TC.png',
        height: 60,
        width: 36,
      });
    } else if (this.props.image == '40x40') {
      this.setState({
        imageURL: 'http://i.imgur.com/ZoU91JG.png',
        height: 40,
        width: 40,
      });
    } else {
      this.setState({
        imageURL: 'http://i.imgur.com/cfjCxrh.png',
        height: 20,
        width: 82,
      });
    }
  }

  render() {
    return (
      <a href={'http://line.me/R/msg/text/?' + encodeURIComponent(this.props.text)}>
      <img
        src={this.state.imageURL}
        style={{ height:this.state.height, width:this.state.width }}
        alt="LINEで送る" /></a>
    );
  }
}<commit_msg>fix LINEButton<commit_after>import React from 'react';

export default class LINEButton extends React.Component {
  constructor(props) {
    super(props);
    this.state = ({
      imageURL: '',
      height: '',
      width: '',
    });
  }

  componentWillMount() {
    if (this.props.image === '20x20') {
      this.setState({
        imageURL: 'http://i.imgur.com/voMN0NH.png',
        height: 20,
        width: 20,
      });
    } else if (this.props.image === '30x30') {
      this.setState({
        imageURL: 'http://i.imgur.com/Lkq9vFO.png',
        height: 30,
        width: 30,
      });
    } else if (this.props.image === '36x60') {
      this.setState({
        imageURL: 'http://i.imgur.com/5sEp1TC.png',
        height: 60,
        width: 36,
      });
    } else if (this.props.image === '40x40') {
      this.setState({
        imageURL: 'http://i.imgur.com/ZoU91JG.png',
        height: 40,
        width: 40,
      });
    } else {
      this.setState({
        imageURL: 'http://i.imgur.com/cfjCxrh.png',
        height: 20,
        width: 82,
      });
    }
  }

  render() {
    return (
      <a href={`http://line.me/R/msg/text/?${encodeURIComponent(this.props.text)}`}>
        <img
          src={this.state.imageURL}
          style={{ height: this.state.height, width: this.state.width }}
          alt="LINEで送る"
        /></a>
    );
  }
}

LINEButton.propTypes = {
  image: React.PropTypes.string,
  text: React.PropTypes.string,
};

LINEButton.defaultProps = {
  image: '',
  text: ''
};
{'fraction_non_alphanumeric': 0.1755496335776149, 'fraction_numerical': 0.02798134576948701, 'mean_word_length': 1.935483870967742, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '67707', 'n_tokens_mistral': 1111, 'n_tokens_neox': 1052, 'n_words': 180}