{"size": 420, "ext": "js", "max_stars_repo_path": "src/components/BookBack.js", "max_stars_repo_name": "shatalovdm/book-lending-app", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/components/BookBack.js", "max_issues_repo_name": "shatalovdm/book-lending-app", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/components/BookBack.js", "max_forks_repo_name": "shatalovdm/book-lending-app", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 23.3333333333, "max_line_length": 122, "alphanum_fraction": 0.6785714286}
import React from 'react'
import _ from 'lodash'

function BookBack({ description, changeView }) {
	const newDescription = _.truncate(description, {
		'length': 220,
		'separator': ' '
	})
	return (
		<div onClick={changeView} className="book-cover back" style={{ width: 128, height: 193, backgroundColor: "lightgrey" }}>
			<p className="description">
				{newDescription}
			</p>
		</div>
	)
}

export default BookBack