fix(frontend): avoid displaying long description text for block (#8688)

Co-authored-by: Toran Bruce Richards <toran.richards@gmail.com>
This commit is contained in:
Zamil Majdy
2024-11-18 17:25:21 +04:00
committed by GitHub
parent 6fa4b8cb11
commit 402789d8cd

View File

@@ -205,7 +205,10 @@ export const BlocksControl: React.FC<BlocksControlProps> = ({
{beautifyString(block.name).replace(/ Block$/, "")}
</span>
<span className="block break-words text-xs font-normal text-gray-500">
{block.description}
{/* Cap description at 100 characters max */}
{block.description?.length > 100
? block.description.slice(0, 100) + "..."
: block.description}
</span>
</div>
<div