import React from 'react'; const QuestionnairAnswer = ({ answer }) => { console.log(answer) return (
{`${index + 1}.${answer.type === 'input' ? answer.completionForwards : answer.title + ':'}`}
{typeof answer.answer[answer.type] !== 'string' ? ( typeof answer.answer[answer.type].optionValue !== 'string' ? ( answer.answer[answer.type].optionValue.map((item, index) => { return ( item && {item} ) }) ) : answer.answer[answer.type].optionValue ) : answer.answer[answer.type]}
); } export default QuestionnairAnswer;