diff --git a/frontend/src/shared/components/CardComposer/index.tsx b/frontend/src/shared/components/CardComposer/index.tsx index a350ec5..87d27ff 100644 --- a/frontend/src/shared/components/CardComposer/index.tsx +++ b/frontend/src/shared/components/CardComposer/index.tsx @@ -38,8 +38,10 @@ const CardComposer = ({ isOpen, onCreateCard, onClose }: Props) => { taskGroupID="" editable onEditCard={(_taskGroupID, _taskID, name) => { - onCreateCard(name); - setCardName(''); + if (cardName.trim() !== '') { + onCreateCard(name.trim()); + setCardName(''); + } }} onCardTitleChange={name => { setCardName(name); @@ -50,8 +52,10 @@ const CardComposer = ({ isOpen, onCreateCard, onClose }: Props) => { { - onCreateCard(cardName); - setCardName(''); + if (cardName.trim() !== '') { + onCreateCard(cardName.trim()); + setCardName(''); + } }} > Add Card