import React from "react"; import { IQuestionData, IAnswer } from "../types"; import { getAnswerElementByType } from "../helpers"; type Props = { question: IQuestionData; answer: IAnswer; }; export const AQuestion = ({ question, answer }: Props) => { return (
{question.isRequired ? (
* 필수질문
) : ( <> )}
{question.title}
{question.comment}
{getAnswerElementByType(question, answer)}
); };