fix: hide empty blocks in connection installation guide

Filter out blocks with no title, description, or buttons
instead of rendering empty cards/accordions/timeline items.
This commit is contained in:
Fringg
2026-02-18 09:17:10 +03:00
parent 8207368ef7
commit 96f9a719fd
4 changed files with 30 additions and 6 deletions

View File

@@ -10,9 +10,15 @@ export function CardsBlock({
getSvgHtml,
renderBlockButtons,
}: BlockRendererProps) {
const visibleBlocks = blocks.filter(
(b) => getLocalizedText(b.title) || getLocalizedText(b.description) || b.buttons?.length,
);
if (!visibleBlocks.length) return null;
return (
<div className="space-y-3">
{blocks.map((block, index) => {
{visibleBlocks.map((block, index) => {
const gradientStyle = getColorGradient(block.svgIconColor || 'cyan', isLight);
return (