Commit 65ed18b5 authored by Lee SeoYeon's avatar Lee SeoYeon
Browse files

주석처리

parent 1974a61d
import React from "react";
import { CheckboxType } from "../types";
import { useQuestion } from "./question.context";
import { Edit } from "./Edit";
import { TypeChange } from "./typeDD";
// import { useQuestion } from "./question.context";
// import { Edit } from "./Edit";
// import { TypeChange } from "./typeDD";
type Props = {
element: CheckboxType;
};
export const QCheckbox = ({ element }: Props) => {
const { questionListChange } = useQuestion();
// const { questionListChange } = useQuestion();
return (
<div className="flex flex-col container w-4/5 h-auto border-2 border-themeColor items-center m-3 py-2">
......@@ -20,9 +20,9 @@ export const QCheckbox = ({ element }: Props) => {
id={element._id}
className="text-xl font-bold ml-6 border-b-2 w-1/2"
placeholder={element.title}
onChange={questionListChange}
// onChange={questionListChange}
></input>
<TypeChange tt="checkbox" />
{/* <TypeChange tt="checkbox" /> */}
</div>
<div className="flex w-full justify-center">
<input
......@@ -31,7 +31,7 @@ export const QCheckbox = ({ element }: Props) => {
id={element._id}
className="border w-11/12"
placeholder="질문에 대한 설명을 입력해주세요"
onChange={questionListChange}
// onChange={questionListChange}
></input>
</div>
<div id="commentarea" className="flex mt-4">
......@@ -50,7 +50,7 @@ export const QCheckbox = ({ element }: Props) => {
<button className="w-1/12">필수</button>
<button className="w-1/12">옵션</button>
<button className="w-1/12">삭제</button>
<Edit id={element._id} />
{/* <Edit id={element._id} /> */}
</div>
</div>
);
......
import { useQuestion } from "./question.context";
// import { useQuestion } from "./question.context";
import React from "react";
import { DropdownType } from "../types";
import { useQuestion } from "./question.context";
import { TypeChange } from "./typeDD";
// import { useQuestion } from "./question.context";
// import { TypeChange } from "./typeDD";
type Props = {
element: DropdownType;
};
export const QDropdown = ({ element }: Props) => {
const { questionListChange } = useQuestion();
// const { questionListChange } = useQuestion();
return (
<div className="flex flex-col container w-4/5 h-auto border-2 border-themeColor items-center m-3 py-2">
<div className="flex flexgi-row h-16 w-full place-content-between items-center">
......@@ -18,9 +18,9 @@ export const QDropdown = ({ element }: Props) => {
id={element._id}
className="text-xl font-bold ml-6 border-b-2 w-1/2"
placeholder={element.title}
onChange={questionListChange}
// onChange={questionListChange}
></input>
<TypeChange tt="dropdown" />
{/* <TypeChange tt="dropdown" /> */}
</div>
<div className="flex w-full justify-center">
<input
......@@ -29,7 +29,7 @@ export const QDropdown = ({ element }: Props) => {
id={element._id}
className="border w-11/12"
placeholder="질문에 대한 설명을 입력해주세요"
onChange={questionListChange}
// onChange={questionListChange}
></input>
</div>
<div id="commentarea" className="flex mt-4">
......
import React, { useState } from "react";
import { FileType } from "../types";
import { useQuestion } from "./question.context";
import { TypeChange } from "./typeDD";
// import { useQuestion } from "./question.context";
// import { TypeChange } from "./typeDD";
type Props = {
element: FileType;
};
export const QFile = ({ element }: Props) => {
const { questionListChange } = useQuestion();
// const { questionListChange } = useQuestion();
return (
<div className="flex flex-col container w-4/5 h-auto border-2 border-themeColor items-center m-3 py-2">
......@@ -19,9 +19,9 @@ export const QFile = ({ element }: Props) => {
id={element._id}
className="text-xl font-bold ml-6 border-b-2 w-1/2"
placeholder={element.title}
onChange={questionListChange}
// onChange={questionListChange}
></input>
<TypeChange tt="file" />
{/* <TypeChange tt="file" /> */}
</div>
<div className="flex w-full justify-center">
<input
......@@ -30,7 +30,7 @@ export const QFile = ({ element }: Props) => {
id={element._id}
className="border w-11/12"
placeholder="질문에 대한 설명을 입력해주세요"
onChange={questionListChange}
// onChange={questionListChange}
></input>
</div>
<div id="commentarea" className="flex mt-4 w-full justify-center">
......
import { useQuestion } from "./question.context";
//import { useQuestion } from "./question.context";///
import React from "react";
import { RadioType } from "../types";
import { useQuestion } from "./question.context";
import { TypeChange } from "./typeDD";
// import { useQuestion } from "./question.context";
// import { TypeChange } from "./typeDD";
type Props = {
element: RadioType;
};
export const QRadio = ({ element }: Props) => {
const { questionListChange } = useQuestion();
// const { questionListChange } = useQuestion();
return (
<div className="flex flex-col container w-4/5 h-auto border-2 border-themeColor items-center m-3 py-2">
<div className="flex h-16 w-full place-content-between items-center">
......@@ -18,9 +18,9 @@ export const QRadio = ({ element }: Props) => {
id={element._id}
className="text-xl font-bold ml-6 border-b-2 w-1/2"
placeholder={element.title}
onChange={questionListChange}
// onChange={questionListChange}
></input>
<TypeChange tt="radio" />
{/* <TypeChange tt="radio" /> */}
</div>
<div className="flex w-full justify-center">
<input
......@@ -29,7 +29,7 @@ export const QRadio = ({ element }: Props) => {
id={element._id}
className="border w-11/12"
placeholder="질문에 대한 설명을 입력해주세요"
onChange={questionListChange}
// onChange={questionListChange}
></input>
</div>
<div className="flex mt-4">
......@@ -48,7 +48,7 @@ export const QRadio = ({ element }: Props) => {
// key={`${index}`}
className="mx-2 border-b-2"
placeholder={e.text}
onChange={questionListChange}
// onChange={questionListChange}
></input>
<button></button>
</div>
......
import React from "react";
import { RatingType } from "../types";
import { useQuestion } from "./question.context";
import { TypeChange } from "./typeDD";
// import { useQuestion } from "./question.context";
// import { TypeChange } from "./typeDD";
type Props = {
element: RatingType;
......@@ -9,7 +9,7 @@ type Props = {
};
export const QRating = ({ element }: Props) => {
const { questionListChange } = useQuestion();
// const { questionListChange } = useQuestion();
return (
<div className="flex flex-col container w-4/5 h-auto border-2 border-themeColor items-center m-3 py-2">
......@@ -20,9 +20,9 @@ export const QRating = ({ element }: Props) => {
id={element._id}
className="text-xl font-bold ml-6 border-b-2 w-1/2"
placeholder={element.title}
onChange={questionListChange}
// onChange={questionListChange}
></input>
<TypeChange tt="rating" />
{/* <TypeChange tt="rating" /> */}
</div>
<div className="flex w-full justify-center">
<input
......@@ -31,7 +31,7 @@ export const QRating = ({ element }: Props) => {
id={element._id}
className="border w-11/12"
placeholder="질문에 대한 설명을 입력해주세요"
onChange={questionListChange}
// onChange={questionListChange}
></input>
</div>
<div className="flex place-content-between items-center p-5">
......
export { Question } from "./Question";
//export { Question } from "./Question";
import React, { FormEvent, useState } from "react";
import { questionApi, surveyApi } from "../apis";
import { Question } from "../questions";
// import { Question } from "../questions";
import { BasicQuestionType, SurveyType } from "../types";
export const CreateSurvey = () => {
......@@ -65,9 +65,9 @@ export const CreateSurvey = () => {
onChange={handleChange}
></input>
</div>
{questions.map((question) => (
{/* {questions.map((question) => (
<Question element={question} />
))}
))} */}
<div className="flex w-4/5 content-center justify-center border-2 border-black h-8 mt-3">
<button type="button" onClick={addQuestion}>
질문 추가
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment