Commit 0150d3d8 authored by jang dong hyeok's avatar jang dong hyeok
Browse files

불필요한 차트관련 코드삭제 및 빈 질문일때 작성되지 않게하기

parent c0481dda
export { CirclesWithG } from "./CirclesWithG";
...@@ -18,9 +18,16 @@ export const Question = ({ ...@@ -18,9 +18,16 @@ export const Question = ({
const isEditing = question.isEditing; const isEditing = question.isEditing;
async function handleEditComplete() { async function handleEditComplete() {
question.isEditing = false; question.content.choices.map((choice) => {
console.log("editing completed:", question); if (choice.text.trim() === "") {
handleQuestion(question); alert("질문작성이 완료되지 않았습니다.");
return (question.isEditing = true);
} else {
question.isEditing = false;
console.log("editing completed:", question);
handleQuestion(question);
}
});
} }
function handleSelect(event: React.ChangeEvent<HTMLSelectElement>) { function handleSelect(event: React.ChangeEvent<HTMLSelectElement>) {
......
...@@ -59,6 +59,7 @@ export interface IRadio extends IQuestionData { ...@@ -59,6 +59,7 @@ export interface IRadio extends IQuestionData {
content: IBasicContent & { content: IBasicContent & {
hasOther: boolean; hasOther: boolean;
otherText: string; otherText: string;
}; };
} }
......
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