Updated delete task card.

This commit is contained in:
THIS ONE IS A LITTLE BIT TRICKY KRUB 2023-11-12 11:45:12 +07:00
parent 23bd8f73bf
commit d4638e03a8
2 changed files with 12 additions and 13 deletions

View File

@ -47,17 +47,14 @@ function ColumnContainer({
ref={setNodeRef} ref={setNodeRef}
style={style} style={style}
className=" className="
bg-columnBackgroundColor bg-columnBackgroundColor
opacity-40 w-[350px]
border-2 h-[500px]
border-pink-500 max-h-[500px]
w-[350px] rounded-md
h-[500px] flex
max-h-[500px] flex-col
rounded-md "
flex
flex-col
"
></div> ></div>
); );
} }
@ -155,7 +152,7 @@ function ColumnContainer({
<TaskCard <TaskCard
key={task.id} key={task.id}
task={task} task={task}
deleteTask={deleteTask} deleteTask={deleteTask} // Pass deleteTask to TaskCard
updateTask={updateTask} updateTask={updateTask}
/> />
))} ))}

View File

@ -120,6 +120,7 @@ function KanbanBoard() {
m-auto m-auto
flex flex
w-full w-full
min-h-screen
items-center items-center
overflow-x-auto overflow-x-auto
overflow-y-hidden overflow-y-hidden
@ -222,7 +223,8 @@ function KanbanBoard() {
if (task.id !== id) return task; if (task.id !== id) return task;
return { ...task, content }; return { ...task, content };
}); });
if (content === "") return deleteTask(id
);
setTasks(newTasks); setTasks(newTasks);
} }