diff --git a/frontend/app/components/platform/TreeContextMenu.tsx b/frontend/app/components/platform/TreeContextMenu.tsx index ca99034..0e1a2ca 100644 --- a/frontend/app/components/platform/TreeContextMenu.tsx +++ b/frontend/app/components/platform/TreeContextMenu.tsx @@ -19,6 +19,7 @@ type TreeContextMenuProps = { onChooseUpload: (parentPath: string) => void; onRemoveDirectory: (path: string) => void; onCopyResourcePath?: (jupyterPath: string) => void; + onRemoveResource?: (resourceId: string) => void; onClose: () => void; }; @@ -32,6 +33,7 @@ export function TreeContextMenu({ onChooseUpload, onRemoveDirectory, onCopyResourcePath, + onRemoveResource, onClose, }: TreeContextMenuProps) { if (!contextMenu) return null; @@ -55,19 +57,36 @@ export function TreeContextMenu({ {contextMenu.kind === "file" && contextMenu.script ? ( <> {isDataResource ? ( - + <> + + {onRemoveResource && ( + + )} + ) : ( <>