fix: Bibliothek section always visible in left sidebar
- LeftSidebar was hiding entire Bibliothek section when blocks array was empty - Removed blocks.length > 0 conditional wrapper - Added blocks || [] fallback to prevent crash - Library tree now visible even with no blocks
This commit is contained in:
@@ -121,11 +121,10 @@ const LeftSidebar: React.FC<LeftSidebarProps> = ({ activeTool, onToolChange, sel
|
||||
</div>
|
||||
)}
|
||||
|
||||
{blocks && blocks.length > 0 && (
|
||||
<div className="tool-section" key="library">
|
||||
<div className="tool-section-label">Bibliothek</div>
|
||||
<BlockLibrary
|
||||
blocks={blocks}
|
||||
blocks={blocks || []}
|
||||
category="Alle"
|
||||
onCategoryChange={onBlockCategoryChange ?? (() => {})}
|
||||
onSearch={onBlockSearch ?? (() => {})}
|
||||
@@ -137,7 +136,6 @@ const LeftSidebar: React.FC<LeftSidebarProps> = ({ activeTool, onToolChange, sel
|
||||
onSaveGroupAsBlock={onSaveGroupAsBlock}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div className="leftbar-footer">
|
||||
{onToggleCollapse && (
|
||||
|
||||
Reference in New Issue
Block a user