Remove doc
This commit is contained in:
@@ -3,9 +3,15 @@
|
||||
import { Card, CardHeader, CardTitle, CardContent } from "@/components/ui/card";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { DragDropContext, Droppable, Draggable } from "@hello-pangea/dnd";
|
||||
import { PlusIcon } from "lucide-react";
|
||||
import { PlusIcon, Trash2 } from "lucide-react";
|
||||
import BoardTask from "./Task";
|
||||
import { TaskViewProps } from "../TaskView";
|
||||
import {
|
||||
ContextMenu,
|
||||
ContextMenuContent,
|
||||
ContextMenuItem,
|
||||
ContextMenuTrigger,
|
||||
} from "@/components/ui/context-menu";
|
||||
|
||||
export default function BoardView({
|
||||
tags,
|
||||
@@ -76,17 +82,41 @@ export default function BoardView({
|
||||
index={index}
|
||||
>
|
||||
{(provided) => (
|
||||
<BoardTask
|
||||
setTask={(t) =>
|
||||
setTasks({
|
||||
...tasks,
|
||||
[t.id]: t,
|
||||
})
|
||||
}
|
||||
provided={provided}
|
||||
task={task}
|
||||
tags={tags}
|
||||
/>
|
||||
<ContextMenu>
|
||||
<ContextMenuTrigger asChild>
|
||||
<div
|
||||
ref={provided.innerRef}
|
||||
{...provided.draggableProps}
|
||||
{...provided.dragHandleProps}
|
||||
>
|
||||
<BoardTask
|
||||
setTask={(t) =>
|
||||
setTasks({
|
||||
...tasks,
|
||||
[t.id]: t,
|
||||
})
|
||||
}
|
||||
provided={provided}
|
||||
task={task}
|
||||
tags={tags}
|
||||
/>
|
||||
</div>
|
||||
</ContextMenuTrigger>
|
||||
|
||||
<ContextMenuContent>
|
||||
<ContextMenuItem
|
||||
className="text-destructive focus:text-destructive"
|
||||
onClick={() => {
|
||||
const updated = { ...tasks };
|
||||
delete updated[task.id];
|
||||
setTasks(updated);
|
||||
}}
|
||||
>
|
||||
<Trash2 className="text-destructive" />
|
||||
Delete
|
||||
</ContextMenuItem>
|
||||
</ContextMenuContent>
|
||||
</ContextMenu>
|
||||
)}
|
||||
</Draggable>
|
||||
))}
|
||||
|
||||
Reference in New Issue
Block a user