<commit_before>"use strict";

import React                    from 'react';
import { connect }              from 'react-redux';

export default class Course extends React.Component {
  static propTypes = {
    course: React.PropTypes.object.isRequired,
    studentId: React.PropTypes.number.isRequired,
  };

  handleLaunch(){
    this.props.loadLaunchUrl(this.props.course.id, this.props.studentId);
  }

  handleRemove(){
    const courseId = this.props.course.id;
    this.props.removePackage(courseId);
  }

  render(){
    return (
      <li className="c-list__item c-list__item--choose">
        <div className="c-list-item__main">
          <svg className="c-icon-arrow" xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48">
            <path className="c-path" d="M14 20l10 10 10-10z"/>
            <path d="M0 0h48v48h-48z" fill="none"/>
          </svg>
          <div className="c-list-item__contain">
            <div className="c-list-item__title">{this.props.course.title}</div>
            <div className="c-list-item__type">
              <div className="c-dropdown">
                <select>
                  <option>Choose import type...</option>
                  <option>Import as graded assignment</option>
                  <option>Import as ungraded assignment</option>
                </select>
                <svg className="c-icon-drop" xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48">
                  <path className="c-path" d="M14 20l10 10 10-10z"/>
                  <path d="M0 0h48v48h-48z" fill="none"/>
                </svg>
              </div>
              <button className="c-btn c-btn--go is-active">Go</button>
            </div>
          </div>
          <div className="c-list-item__icons">
            <button className="c-icon-btn">
              <svg className="c-icon" xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48">
                <path className="c-path" d="M24 9C14 9 5.46 15.22 2 24c3.46 8.78 12 15 22 15s18.54-6.22 22-15C42.54 15.22 34.01 9 24 9zm0 25c-5.52 0-10-4.48-10-10s4.48-10 10-10 10 4.48 10 10-4.48 10-10 10zm0-16c-3.31 0-6 2.69-6 6s2.69 6 6 6 6-2.69 6-6-2.69-6-6-6z"/>
                <path d="M0 0h48v48h-48z" fill="none"/>
              </svg>
            </button>
            <button className="c-icon-btn">
              <svg className="c-icon" xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48">
                <path className="c-path" d="M12 38c0 2.21 1.79 4 4 4h16c2.21 0 4-1.79 4-4v-24h-24v24zm26-30h-7l-2-2h-10l-2 2h-7v4h28v-4z"/>
                <path d="M0 0h48v48h-48z" fill="none"/>
              </svg>
            </button>
          </div>
        </div><commit_msg>add remove button<commit_after>"use strict";

import React                    from 'react';
import { connect }              from 'react-redux';

const DeleteButton = (props) => {
  return (
    <button className="c-icon-btn" onClick={(e) => props.handleClick(e)}>
      <svg className="c-icon" xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48">
        <path className="c-path" d="M12 38c0 2.21 1.79 4 4 4h16c2.21 0 4-1.79 4-4v-24h-24v24zm26-30h-7l-2-2h-10l-2 2h-7v4h28v-4z"/>
        <path d="M0 0h48v48h-48z" fill="none"/>
      </svg>
    </button>
  );
};


export default class Course extends React.Component {
  static propTypes = {
    course: React.PropTypes.object.isRequired,
    studentId: React.PropTypes.number.isRequired,
  };

  handleLaunch(){
    this.props.loadLaunchUrl(this.props.course.id, this.props.studentId);
  }

  handleRemove(){
    const courseId = this.props.course.id;
    this.props.removePackage(courseId);
  }

  render(){
    return (
      <li className="c-list__item c-list__item--choose">
        <div className="c-list-item__main">
          <svg className="c-icon-arrow" xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48">
            <path className="c-path" d="M14 20l10 10 10-10z"/>
            <path d="M0 0h48v48h-48z" fill="none"/>
          </svg>
          <div className="c-list-item__contain">
            <div className="c-list-item__title">{this.props.course.title}</div>
            <div className="c-list-item__type">
              <div className="c-dropdown">
                <select>
                  <option>Choose import type...</option>
                  <option>Import as graded assignment</option>
                  <option>Import as ungraded assignment</option>
                </select>
                <svg className="c-icon-drop" xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48">
                  <path className="c-path" d="M14 20l10 10 10-10z"/>
                  <path d="M0 0h48v48h-48z" fill="none"/>
                </svg>
              </div>
              <button className="c-btn c-btn--go is-active">Go</button>
            </div>
          </div>
          <div className="c-list-item__icons">
            <button className="c-icon-btn">
              <svg className="c-icon" xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48">
                <path className="c-path" d="M24 9C14 9 5.46 15.22 2 24c3.46 8.78 12 15 22 15s18.54-6.22 22-15C42.54 15.22 34.01 9 24 9zm0 25c-5.52 0-10-4.48-10-10s4.48-10 10-10 10 4.48 10 10-4.48 10-10 10zm0-16c-3.31 0-6 2.69-6 6s2.69 6 6 6 6-2.69 6-6-2.69-6-6-6z"/>
                <path d="M0 0h48v48h-48z" fill="none"/>
              </svg>
            </button>
            <DeleteButton handleClick={() => this.handleRemove()}/>
          </div>
        </div>
{'fraction_non_alphanumeric': 0.16362670444483796, 'fraction_numerical': 0.10448025500265627, 'mean_word_length': 1.9710678590215676, 'pattern_counts': {'":': 0, '<': 90, '<?xml version=': 0, '>': 93, 'https://': 0, 'lorem ipsum': 0, 'www.': 8, 'xml': 8}, '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': '2748469', 'n_tokens_mistral': 2350, 'n_tokens_neox': 1946, 'n_words': 396}