<commit_before>import React, { Component } from 'react'
import { connect } from 'react-redux'
import { bindActionCreators } from 'redux'
import { getCurrentlyReading, getCompleted, removeFromCompleted, addToWishlist, getWishlist } from '../actions/index'

import BookList from '../components/book_list'

class CurrentlyReading extends Component {

	componentWillMount() {
		this.props.getCompleted()
	}

	sumbitRemoveFromCompleted(id) {
		this.props.removeFromCompleted(id)
			.then(() => {
				this.props.getCompleted()
			})
	}

	submitToWishlist(book) {
		this.props.addToWishlist(book)
			.then(() => {
				this.props.getWishlist()
			})
	}

	render() {
		return(
			<div className="row centered-form">
				<div className="col-xs-12 col-sm-8 col-md-6 col-sm-offset-2 col-md-offset-3">
					<div className="panel panel-default">
						{ this.props.Completed ? '' : <h2>...Loading Completed</h2> }
						<BookList 
							books={this.props.Completed} 
							parentComponent={'completed'}
							clickedAddToWishlist={ book => this.submitToWishlist(book)}
							clickedRemoveFromCompleted={ id => this.sumbitRemoveFromCompleted(id)}
							/>
					</div>
				</div>
			</div>
		)
	}
}

function mapStateToProps(state) {
  return { Completed: state.Completed }
}

function mapDispatchToProps(dispatch) {
	return bindActionCreators({ getCurrentlyReading, getCompleted, removeFromCompleted, addToWishlist, getWishlist }, dispatch)
}

export default connect(mapStateToProps, mapDispatchToProps)(CurrentlyReading)<commit_msg>reformatted completed container for new styling<commit_after>import React, { Component } from 'react'
import { connect } from 'react-redux'
import { bindActionCreators } from 'redux'
import { getCurrentlyReading, getCompleted, removeFromCompleted, addToWishlist, getWishlist } from '../actions/index'

import BookList from '../components/book_list'

class CurrentlyReading extends Component {

	componentWillMount() {
		this.props.getCompleted()
	}

	sumbitRemoveFromCompleted(id) {
		this.props.removeFromCompleted(id)
			.then(() => {
				this.props.getCompleted()
			})
	}

	submitToWishlist(book) {
		this.props.addToWishlist(book)
			.then(() => {
				this.props.getWishlist()
			})
	}

	render() {
		return(
			<div className="row centered-form">
				<div className="row list-group panel panel-default">
					{ this.props.Completed ? '' : <h2>...Loading Completed</h2> }
					<BookList 
						books={this.props.Completed} 
						parentComponent={'completed'}
						clickedAddToWishlist={ book => this.submitToWishlist(book)}
						clickedRemoveFromCompleted={ id => this.sumbitRemoveFromCompleted(id)}
						/>
				</div>
			</div>
		)
	}
}

function mapStateToProps(state) {
  return { Completed: state.Completed }
}

function mapDispatchToProps(dispatch) {
	return bindActionCreators({ getCurrentlyReading, getCompleted, removeFromCompleted, addToWishlist, getWishlist }, dispatch)
}

export default connect(mapStateToProps, mapDispatchToProps)(CurrentlyReading)
{'fraction_non_alphanumeric': 0.12863347811560308, 'fraction_numerical': 0.003341129301703976, 'mean_word_length': 4.252631578947368, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 27, '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': '234000', 'n_tokens_mistral': 1094, 'n_tokens_neox': 929, 'n_words': 173}