From 903cccee7c29ebfd5df321e9b38ea9c842ce0082 Mon Sep 17 00:00:00 2001 From: Mike Cao Date: Thu, 12 Feb 2026 21:13:49 -0800 Subject: [PATCH] Allow removing board component from column action --- src/app/(main)/boards/[boardId]/BoardColumn.tsx | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) 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'} )}