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

주석처리

parent 1974a61d
import React from "react"; import React from "react";
import { CheckboxType } from "../types"; import { CheckboxType } from "../types";
import { useQuestion } from "./question.context"; // import { useQuestion } from "./question.context";
import { Edit } from "./Edit"; // import { Edit } from "./Edit";
import { TypeChange } from "./typeDD"; // import { TypeChange } from "./typeDD";
type Props = { type Props = {
element: CheckboxType; element: CheckboxType;
}; };
export const QCheckbox = ({ element }: Props) => { export const QCheckbox = ({ element }: Props) => {
const { questionListChange } = useQuestion(); // const { questionListChange } = useQuestion();
return ( 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 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) => { ...@@ -20,9 +20,9 @@ export const QCheckbox = ({ element }: Props) => {
id={element._id} id={element._id}
className="text-xl font-bold ml-6 border-b-2 w-1/2" className="text-xl font-bold ml-6 border-b-2 w-1/2"
placeholder={element.title} placeholder={element.title}
onChange={questionListChange} // onChange={questionListChange}
></input> ></input>
<TypeChange tt="checkbox" /> {/* <TypeChange tt="checkbox" /> */}
</div> </div>
<div className="flex w-full justify-center"> <div className="flex w-full justify-center">
<input <input
...@@ -31,7 +31,7 @@ export const QCheckbox = ({ element }: Props) => { ...@@ -31,7 +31,7 @@ export const QCheckbox = ({ element }: Props) => {
id={element._id} id={element._id}
className="border w-11/12" className="border w-11/12"
placeholder="질문에 대한 설명을 입력해주세요" placeholder="질문에 대한 설명을 입력해주세요"
onChange={questionListChange} // onChange={questionListChange}
></input> ></input>
</div> </div>
<div id="commentarea" className="flex mt-4"> <div id="commentarea" className="flex mt-4">
...@@ -50,7 +50,7 @@ export const QCheckbox = ({ element }: Props) => { ...@@ -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> <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>
</div> </div>
); );
......
import { useQuestion } from "./question.context"; // import { useQuestion } from "./question.context";
import React from "react"; import React from "react";
import { DropdownType } from "../types"; import { DropdownType } from "../types";
import { useQuestion } from "./question.context"; // import { useQuestion } from "./question.context";
import { TypeChange } from "./typeDD"; // import { TypeChange } from "./typeDD";
type Props = { type Props = {
element: DropdownType; element: DropdownType;
}; };
export const QDropdown = ({ element }: Props) => { export const QDropdown = ({ element }: Props) => {
const { questionListChange } = useQuestion(); // const { questionListChange } = useQuestion();
return ( 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 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"> <div className="flex flexgi-row h-16 w-full place-content-between items-center">
...@@ -18,9 +18,9 @@ export const QDropdown = ({ element }: Props) => { ...@@ -18,9 +18,9 @@ export const QDropdown = ({ element }: Props) => {
id={element._id} id={element._id}
className="text-xl font-bold ml-6 border-b-2 w-1/2" className="text-xl font-bold ml-6 border-b-2 w-1/2"
placeholder={element.title} placeholder={element.title}
onChange={questionListChange} // onChange={questionListChange}
></input> ></input>
<TypeChange tt="dropdown" /> {/* <TypeChange tt="dropdown" /> */}
</div> </div>
<div className="flex w-full justify-center"> <div className="flex w-full justify-center">
<input <input
...@@ -29,7 +29,7 @@ export const QDropdown = ({ element }: Props) => { ...@@ -29,7 +29,7 @@ export const QDropdown = ({ element }: Props) => {
id={element._id} id={element._id}
className="border w-11/12" className="border w-11/12"
placeholder="질문에 대한 설명을 입력해주세요" placeholder="질문에 대한 설명을 입력해주세요"
onChange={questionListChange} // onChange={questionListChange}
></input> ></input>
</div> </div>
<div id="commentarea" className="flex mt-4"> <div id="commentarea" className="flex mt-4">
......
import React, { useState } from "react"; import React, { useState } from "react";
import { FileType } from "../types"; import { FileType } from "../types";
import { useQuestion } from "./question.context"; // import { useQuestion } from "./question.context";
import { TypeChange } from "./typeDD"; // import { TypeChange } from "./typeDD";
type Props = { type Props = {
element: FileType; element: FileType;
}; };
export const QFile = ({ element }: Props) => { export const QFile = ({ element }: Props) => {
const { questionListChange } = useQuestion(); // const { questionListChange } = useQuestion();
return ( 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 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) => { ...@@ -19,9 +19,9 @@ export const QFile = ({ element }: Props) => {
id={element._id} id={element._id}
className="text-xl font-bold ml-6 border-b-2 w-1/2" className="text-xl font-bold ml-6 border-b-2 w-1/2"
placeholder={element.title} placeholder={element.title}
onChange={questionListChange} // onChange={questionListChange}
></input> ></input>
<TypeChange tt="file" /> {/* <TypeChange tt="file" /> */}
</div> </div>
<div className="flex w-full justify-center"> <div className="flex w-full justify-center">
<input <input
...@@ -30,7 +30,7 @@ export const QFile = ({ element }: Props) => { ...@@ -30,7 +30,7 @@ export const QFile = ({ element }: Props) => {
id={element._id} id={element._id}
className="border w-11/12" className="border w-11/12"
placeholder="질문에 대한 설명을 입력해주세요" placeholder="질문에 대한 설명을 입력해주세요"
onChange={questionListChange} // onChange={questionListChange}
></input> ></input>
</div> </div>
<div id="commentarea" className="flex mt-4 w-full justify-center"> <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 React from "react";
import { RadioType } from "../types"; import { RadioType } from "../types";
import { useQuestion } from "./question.context"; // import { useQuestion } from "./question.context";
import { TypeChange } from "./typeDD"; // import { TypeChange } from "./typeDD";
type Props = { type Props = {
element: RadioType; element: RadioType;
}; };
export const QRadio = ({ element }: Props) => { export const QRadio = ({ element }: Props) => {
const { questionListChange } = useQuestion(); // const { questionListChange } = useQuestion();
return ( 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 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"> <div className="flex h-16 w-full place-content-between items-center">
...@@ -18,9 +18,9 @@ export const QRadio = ({ element }: Props) => { ...@@ -18,9 +18,9 @@ export const QRadio = ({ element }: Props) => {
id={element._id} id={element._id}
className="text-xl font-bold ml-6 border-b-2 w-1/2" className="text-xl font-bold ml-6 border-b-2 w-1/2"
placeholder={element.title} placeholder={element.title}
onChange={questionListChange} // onChange={questionListChange}
></input> ></input>
<TypeChange tt="radio" /> {/* <TypeChange tt="radio" /> */}
</div> </div>
<div className="flex w-full justify-center"> <div className="flex w-full justify-center">
<input <input
...@@ -29,7 +29,7 @@ export const QRadio = ({ element }: Props) => { ...@@ -29,7 +29,7 @@ export const QRadio = ({ element }: Props) => {
id={element._id} id={element._id}
className="border w-11/12" className="border w-11/12"
placeholder="질문에 대한 설명을 입력해주세요" placeholder="질문에 대한 설명을 입력해주세요"
onChange={questionListChange} // onChange={questionListChange}
></input> ></input>
</div> </div>
<div className="flex mt-4"> <div className="flex mt-4">
...@@ -48,7 +48,7 @@ export const QRadio = ({ element }: Props) => { ...@@ -48,7 +48,7 @@ export const QRadio = ({ element }: Props) => {
// key={`${index}`} // key={`${index}`}
className="mx-2 border-b-2" className="mx-2 border-b-2"
placeholder={e.text} placeholder={e.text}
onChange={questionListChange} // onChange={questionListChange}
></input> ></input>
<button></button> <button></button>
</div> </div>
......
import React from "react"; import React from "react";
import { RatingType } from "../types"; import { RatingType } from "../types";
import { useQuestion } from "./question.context"; // import { useQuestion } from "./question.context";
import { TypeChange } from "./typeDD"; // import { TypeChange } from "./typeDD";
type Props = { type Props = {
element: RatingType; element: RatingType;
...@@ -9,7 +9,7 @@ type Props = { ...@@ -9,7 +9,7 @@ type Props = {
}; };
export const QRating = ({ element }: Props) => { export const QRating = ({ element }: Props) => {
const { questionListChange } = useQuestion(); // const { questionListChange } = useQuestion();
return ( 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 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) => { ...@@ -20,9 +20,9 @@ export const QRating = ({ element }: Props) => {
id={element._id} id={element._id}
className="text-xl font-bold ml-6 border-b-2 w-1/2" className="text-xl font-bold ml-6 border-b-2 w-1/2"
placeholder={element.title} placeholder={element.title}
onChange={questionListChange} // onChange={questionListChange}
></input> ></input>
<TypeChange tt="rating" /> {/* <TypeChange tt="rating" /> */}
</div> </div>
<div className="flex w-full justify-center"> <div className="flex w-full justify-center">
<input <input
...@@ -31,7 +31,7 @@ export const QRating = ({ element }: Props) => { ...@@ -31,7 +31,7 @@ export const QRating = ({ element }: Props) => {
id={element._id} id={element._id}
className="border w-11/12" className="border w-11/12"
placeholder="질문에 대한 설명을 입력해주세요" placeholder="질문에 대한 설명을 입력해주세요"
onChange={questionListChange} // onChange={questionListChange}
></input> ></input>
</div> </div>
<div className="flex place-content-between items-center p-5"> <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 React, { FormEvent, useState } from "react";
import { questionApi, surveyApi } from "../apis"; import { questionApi, surveyApi } from "../apis";
import { Question } from "../questions"; // import { Question } from "../questions";
import { BasicQuestionType, SurveyType } from "../types"; import { BasicQuestionType, SurveyType } from "../types";
export const CreateSurvey = () => { export const CreateSurvey = () => {
...@@ -65,9 +65,9 @@ export const CreateSurvey = () => { ...@@ -65,9 +65,9 @@ export const CreateSurvey = () => {
onChange={handleChange} onChange={handleChange}
></input> ></input>
</div> </div>
{questions.map((question) => ( {/* {questions.map((question) => (
<Question element={question} /> <Question element={question} />
))} ))} */}
<div className="flex w-4/5 content-center justify-center border-2 border-black h-8 mt-3"> <div className="flex w-4/5 content-center justify-center border-2 border-black h-8 mt-3">
<button type="button" onClick={addQuestion}> <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