diff --git a/autogpt_platform/frontend/src/app/(platform)/build/components/NewControlPanel/NewBlockMenu/Block.tsx b/autogpt_platform/frontend/src/app/(platform)/build/components/NewControlPanel/NewBlockMenu/Block.tsx index 10f4fc8a44..a5f18d6ef6 100644 --- a/autogpt_platform/frontend/src/app/(platform)/build/components/NewControlPanel/NewBlockMenu/Block.tsx +++ b/autogpt_platform/frontend/src/app/(platform)/build/components/NewControlPanel/NewBlockMenu/Block.tsx @@ -57,7 +57,7 @@ export const Block: BlockComponent = ({ // preview when user drags it const dragPreview = document.createElement("div"); dragPreview.style.cssText = blockDragPreviewStyle; - dragPreview.textContent = beautifyString(title || ""); + dragPreview.textContent = beautifyString(title || "").replace(/ Block$/, ""); document.body.appendChild(dragPreview); e.dataTransfer.setDragImage(dragPreview, 0, 0); @@ -90,7 +90,7 @@ export const Block: BlockComponent = ({ "line-clamp-1 font-sans text-sm font-medium leading-[1.375rem] text-zinc-800 group-disabled:text-zinc-400", )} > - {highlightText(beautifyString(title), highlightedText)} + {highlightText(beautifyString(title).replace(/ Block$/, ""), highlightedText)} )} {description && ( diff --git a/autogpt_platform/frontend/src/app/(platform)/build/components/NewControlPanel/NewBlockMenu/IntergrationBlock.tsx b/autogpt_platform/frontend/src/app/(platform)/build/components/NewControlPanel/NewBlockMenu/IntergrationBlock.tsx index 966bded009..f69ae0cadf 100644 --- a/autogpt_platform/frontend/src/app/(platform)/build/components/NewControlPanel/NewBlockMenu/IntergrationBlock.tsx +++ b/autogpt_platform/frontend/src/app/(platform)/build/components/NewControlPanel/NewBlockMenu/IntergrationBlock.tsx @@ -61,7 +61,7 @@ export const IntegrationBlock: IntegrationBlockComponent = ({ // preview when user drags it const dragPreview = document.createElement("div"); dragPreview.style.cssText = blockDragPreviewStyle; - dragPreview.textContent = beautifyString(title || ""); + dragPreview.textContent = beautifyString(title || "").replace(/ Block$/, ""); document.body.appendChild(dragPreview); e.dataTransfer.setDragImage(dragPreview, 0, 0); @@ -100,7 +100,7 @@ export const IntegrationBlock: IntegrationBlockComponent = ({ "line-clamp-1 font-sans text-sm font-medium leading-[1.375rem] text-zinc-800 group-disabled:text-zinc-400", )} > - {highlightText(beautifyString(title), highlightedText)} + {highlightText(beautifyString(title).replace(/ Block$/, ""), highlightedText)} )} {description && (