<commit_before><commit_msg>create a CourseSearcherModal<commit_after>import React, {PropTypes} from 'react'

import omit from 'lodash/object/omit'
import history from '../history'
import Modal from '../components/modal'
import CourseSearcher from './course-searcher'

function closeModal(location) {
	const query = omit(location.query, ['search-overlay'])
	history.pushState(null, location.pathname, query)
}

export default function CourseSearcherSheet(props, context) {
	const { actions } = props
	const boundCloseModal = closeModal.bind(null, context.location)

	return <Modal
		backdropClassName='modal-backdrop'
		modalClassName='course-searcher--modal'
		onClose={boundCloseModal}
	>
		<CourseSearcher
			actions={actions}
			closeSearcher={boundCloseModal}
			isHidden={false}
		/>
	</Modal>
}

CourseSearcherSheet.propTypes = {
	actions: PropTypes.objectOf(PropTypes.func).isRequired,
}

CourseSearcherSheet.contextTypes = {
	location: PropTypes.object,
}
{'fraction_non_alphanumeric': 0.11734164070612668, 'fraction_numerical': 0.0, 'mean_word_length': 5.836879432624113, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, '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': '7572343', 'n_tokens_mistral': 307, 'n_tokens_neox': 298, 'n_words': 60}