Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -150,4 +150,5 @@ dist

# Claude Code configuration
CLAUDE.md
.claude//
.claude
.omc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,13 @@ type MainQuestionsContentsProps = {
handleContentChange: (index: number, newContent: string) => void;
};

export default function MainQuestionsContents({ questions, isDeleteMode, handleDelete, handleDragEnd, handleContentChange }: MainQuestionsContentsProps) {
export default function MainQuestionsContents({
questions,
isDeleteMode,
handleDelete,
handleDragEnd,
handleContentChange,
}: MainQuestionsContentsProps) {
const { toast } = useToast();

const originalContentRef = useRef<{ [key: number]: string }>({});
Expand Down Expand Up @@ -190,7 +196,7 @@ export default function MainQuestionsContents({ questions, isDeleteMode, handleD
cursor: grab;
display: flex;
align-items: center;
padding: 0.4rem;
/* padding: 0.4rem; */

&:active {
cursor: grabbing;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,13 +211,18 @@ export default function QuestionEditSection({ onClose }: QuestionEditSectionProp
* 삭제 모드 완료 핸들러
*/
const handleDeleteModeComplete = () => {
const hasChanged = !isEqual(originalQuestions, editingQuestions);
const hasDeleted = questions.length < backupQuestions.length;
setIsDeleteMode(false);
setBackupQuestions([]);

if (hasDeleted) {
toast.success("삭제가 완료되었어요!");
}

if (hasChanged) {
toast.success("수정이 완료되었어요!");
}
};

// 제출 완료 핸들러
Expand All @@ -237,6 +242,10 @@ export default function QuestionEditSection({ onClose }: QuestionEditSectionProp
setRetrospectQuestions(editingQuestions);
}

if (hasChanged) {
toast.success("수정이 완료되었어요!");
}

onClose();
};

Expand Down