mirror of
https://github.com/TurTaskProject/TurTaskWeb.git
synced 2025-12-19 14:04:07 +01:00
Updated delete task card.
This commit is contained in:
parent
23bd8f73bf
commit
d4638e03a8
@ -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}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
|
|||||||
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user