ETHReport/components/interviews/singleInterview/index.js

28 lines
743 B
JavaScript

import React from 'react';
import { PropTypes } from 'prop-types';
import Parser from 'html-react-parser';
import Modal from '../../modal';
import './style.scss';
const SingleInterview = props => (
<Modal
isModalOpen
closeModal={props.toggleSingleInterview}
>
<div className="single-interview">
<span className="number">{ props.activeSingleInterviewId }</span>
<div>{ Parser(props.selectedInterview.content) }</div>
</div>
</Modal>
);
SingleInterview.propTypes = {
activeSingleInterviewId: PropTypes.number.isRequired,
selectedInterview: PropTypes.shape({
content: PropTypes.string.isRequired,
}).isRequired,
toggleSingleInterview: PropTypes.func.isRequired,
};
export default SingleInterview;