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.title}
{question.isRequired ? (
* 필수질문
) : ( <> )}
{question.comment}
{getAnswerElementByType(question, answer)}
); };