2018-07-06 11:45:36 +00:00
|
|
|
import React from 'react';
|
|
|
|
import { PropTypes } from 'prop-types';
|
|
|
|
import Modal from '../../modal';
|
|
|
|
import './style.scss';
|
|
|
|
|
|
|
|
const InterviewsList = props => (
|
|
|
|
<div className="interviews-wrap">
|
|
|
|
<div className="mob-interviews-link">
|
|
|
|
<span role="button" tabIndex="0" onClick={props.toggleInterviewsListModal}>Interviews ({ props.data.length })</span> {/* eslint-disable-line */}
|
|
|
|
<span role="button" tabIndex="0" onClick={props.toggleInterviewsListModal}>View</span> {/* eslint-disable-line */}
|
|
|
|
</div>
|
|
|
|
<Modal
|
|
|
|
isModalOpen={props.isInterviewsListModalOpen}
|
|
|
|
closeModal={props.toggleInterviewsListModal}
|
|
|
|
modalOnMobileOnly
|
|
|
|
>
|
|
|
|
<div className="interviews-list">
|
|
|
|
<h4>Interviews ({ props.data.length })</h4>
|
|
|
|
<ul>
|
2018-07-06 12:36:22 +00:00
|
|
|
{ props.data.map(interview => (
|
|
|
|
// eslint-disable-next-line
|
|
|
|
<li
|
|
|
|
id={interview.id}
|
|
|
|
key={interview.id}
|
|
|
|
onClick={props.toggleSingleInterview}
|
|
|
|
>
|
|
|
|
{ interview.name }
|
|
|
|
</li>
|
|
|
|
))
|
2018-07-06 11:45:36 +00:00
|
|
|
}
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</Modal>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
|
|
|
|
InterviewsList.propTypes = {
|
|
|
|
isInterviewsListModalOpen: PropTypes.bool.isRequired,
|
2018-07-06 12:36:22 +00:00
|
|
|
data: PropTypes.arrayOf(PropTypes.node).isRequired,
|
2018-07-06 11:45:36 +00:00
|
|
|
toggleSingleInterview: PropTypes.func.isRequired,
|
|
|
|
toggleInterviewsListModal: PropTypes.func.isRequired,
|
2018-07-06 12:36:22 +00:00
|
|
|
};
|
2018-07-06 11:45:36 +00:00
|
|
|
|
|
|
|
export default InterviewsList;
|