diff --git a/src/app/(main)/boards/[boardId]/BoardColumn.tsx b/src/app/(main)/boards/[boardId]/BoardColumn.tsx index dc140a60d..334178d78 100644 --- a/src/app/(main)/boards/[boardId]/BoardColumn.tsx +++ b/src/app/(main)/boards/[boardId]/BoardColumn.tsx @@ -48,6 +48,17 @@ export function BoardColumn({ setShowSelect(false); }; + const hasComponent = !!component; + const canRemoveAction = hasComponent || canRemove; + + const handleRemove = () => { + if (hasComponent) { + onSetComponent?.(id, null); + } else { + onRemove?.(id); + } + }; + return ( - {editing && canRemove && ( + {editing && canRemoveAction && ( - - Remove column + {hasComponent ? 'Remove component' : 'Remove column'} )}