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

View File

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