import React, { useState } from "react"; import { useNavigate } from "react-router-dom"; import { BasicQuestionType, SurveyType } from "../types"; import { ACheckboxForm } from "./ACheckbox"; import { ADropdownForm } from "./ADropdown"; import { AEssayForm } from "./AEssayForm"; import { ARadioForm } from "./ARadioForm"; type PropsType = { question: BasicQuestionType; }; export const AQuestion = ({ question }: PropsType) => { function getContent(question: BasicQuestionType) { switch (question.type) { case "essay": return ; case "radio": return ; case "checkbox": return ; case "dropdown": return ; // case "file": // return ; // case "rating": // return ( // // ); default: return <>; } } return (
질문
내용
{getContent(question)}
); };