Commit aa1aeb15 authored by Jiwon Yoon's avatar Jiwon Yoon
Browse files

중복회원가입 에러 메세지창, 짧은글 타입 확인 안눌리는 에러 고침

parent 0150d3d8
......@@ -33,7 +33,7 @@ export const OAuthRedirectHandler = () => {
}
} catch (error) {
setLoading(false);
catchErrors(error, setError);
catchErrors(error, alert);
}
};
if (code) {
......
......@@ -18,16 +18,27 @@ export const Question = ({
const isEditing = question.isEditing;
async function handleEditComplete() {
question.content.choices.map((choice) => {
if (choice.text.trim() === "") {
alert("질문작성이 완료되지 않았습니다.");
return (question.isEditing = true);
} else {
if (question.content.choices.length === 0) {
if (question.type === ("singletext" || "date")) {
question.isEditing = false;
console.log("editing completed:", question);
handleQuestion(question);
} else {
alert("질문작성이 완료되지 않았습니다.");
return (question.isEditing = true);
}
});
} else {
question.content.choices.map((choice) => {
if (choice.text.trim() === "") {
alert("질문작성이 완료되지 않았습니다.");
return (question.isEditing = true);
} else {
question.isEditing = false;
console.log("editing completed:", question);
handleQuestion(question);
}
});
}
}
function handleSelect(event: React.ChangeEvent<HTMLSelectElement>) {
......
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