Skip to content

Commit

Permalink
Comment: #204 React Reparenting 문제 주석 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
Seok93 committed Oct 11, 2024
1 parent a9c21e0 commit 079ac1c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/components/task/kanban/TaskItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ type TaskItemProps = {
colorCode: ProjectStatus['colorCode'];
};

// ToDo: React Reparenting 관련된 문제가 있음.
export default function TaskItem({ task, colorCode }: TaskItemProps) {
const { project } = useProjectContext();
const { showModal: showDetailModal, openModal: openDetailModal, closeModal: closeDetailModal } = useModal();
const { showModal: showUpdateModal, openModal: openUpdateModal, closeModal: closeUpdateModal } = useModal();

const { taskId, taskName, sortOrder } = task;
const { taskId, statusId, taskName, sortOrder } = task;
const index = useMemo(() => sortOrder - 1, [sortOrder]);
const draggableId = useMemo(() => generatePrefixId(taskId, DND_DRAGGABLE_PREFIX.TASK), [taskId]);

Expand Down Expand Up @@ -47,16 +48,16 @@ export default function TaskItem({ task, colorCode }: TaskItemProps) {
{showDetailModal && (
<DetailModalTask
projectId={project.projectId}
statusId={task.statusId}
taskId={task.taskId}
statusId={statusId}
taskId={taskId}
openUpdateModal={openUpdateModal}
onClose={closeDetailModal}
/>
)}
{showUpdateModal && (
<UpdateModalTask
project={project}
taskId={task.taskId}
taskId={taskId}
openDetailModal={openDetailModal}
onClose={closeUpdateModal}
/>
Expand Down

0 comments on commit 079ac1c

Please sign in to comment.