Skip to content

Build your personal knowledge base with Trilium Notes

fix(client/promoted_attributes): unnecessary space when empty

Elian Doranf83c46d1c754
diff --git a/apps/client/src/widgets/PromotedAttributes.tsx b/apps/client/src/widgets/PromotedAttributes.tsx
index f24cd7d60e..56807bd145 100644
--- a/apps/client/src/widgets/PromotedAttributes.tsx
+++ b/apps/client/src/widgets/PromotedAttributes.tsx
@@ -42,14 +42,14 @@ export default function PromotedAttributes() {
return (
<div className="promoted-attributes-widget">
- <div className="promoted-attributes-container">
+ {cells && cells.length > 0 && <div className="promoted-attributes-container">
{note && cells?.map(cell => <PromotedAttributeCell
cell={cell}
cells={cells} setCells={setCells}
shouldFocus={cell === cellToFocus} setCellToFocus={setCellToFocus}
componentId={componentId} note={note}
/>)}
- </div>
+ </div>}
</div>
);
}