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,6 +18,16 @@ export const Question = ({
const isEditing = question.isEditing;
async function handleEditComplete() {
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("질문작성이 완료되지 않았습니다.");
......@@ -29,6 +39,7 @@ export const Question = ({
}
});
}
}
function handleSelect(event: React.ChangeEvent<HTMLSelectElement>) {
const selectedType = event.currentTarget.value;
......
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