import React from 'react'; import { PropTypes } from 'prop-types'; import Modal from '../../modal'; import './style.scss'; const SingleInterview = props => (
{ props.activeSingleInterviewId } { props.selectedInterview.name } { props.selectedInterview.interview.filter(interview => interview.answer !== null) .map((interview, index) => { const question = props.questions[interview.question]; return (

{index + 1}) { question.text }

{ interview.answer }

); }) }
); SingleInterview.propTypes = { activeSingleInterviewId: PropTypes.number.isRequired, selectedInterview: PropTypes.shape({ name: PropTypes.string.isRequired, interview: PropTypes.array.isRequired, }).isRequired, toggleSingleInterview: PropTypes.func.isRequired, questions: PropTypes.shape({ id: PropTypes.number.isRequired, text: PropTypes.string.isRequired, }).isRequired, }; export default SingleInterview;