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

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

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