fix: remove Bibliothek from left sidebar (was always on right)

- Removed BlockLibrary section from LeftSidebar.tsx
- Removed unused BlockLibrary import
- Removed unused block-related props from LeftSidebar destructuring
- Bibliothek belongs in right sidebar as a tab (already existed there)
This commit is contained in:
2026-06-29 13:35:50 +02:00
parent 2c6f7b2e8b
commit 1b2d6815cb
+1 -17
View File
@@ -1,7 +1,6 @@
import React from 'react'; import React from 'react';
import type { LeftSidebarProps } from '../types/ui.types'; import type { LeftSidebarProps } from '../types/ui.types';
import { SEATING_TEMPLATES } from '../services/seatingService'; import { SEATING_TEMPLATES } from '../services/seatingService';
import BlockLibrary from './BlockLibrary';
interface ToolDef { interface ToolDef {
tool: string; tool: string;
@@ -57,7 +56,7 @@ const sections: Array<{ label: string; tools: ToolDef[] }> = [
{ label: 'Bestuhlung', tools: sectionBestuhlung }, { label: 'Bestuhlung', tools: sectionBestuhlung },
]; ];
const LeftSidebar: React.FC<LeftSidebarProps> = ({ activeTool, onToolChange, selectedTemplate, onTemplateSelect, onCollapse, className, collapsed, onToggleCollapse, blocks, onDragBlock, onBlockCategoryChange, onBlockSearch, onRenameBlock, onDuplicateBlock, onDeleteBlock, onSvgImport, onSaveGroupAsBlock }) => { const LeftSidebar: React.FC<LeftSidebarProps> = ({ activeTool, onToolChange, selectedTemplate, onTemplateSelect, onCollapse, className, collapsed, onToggleCollapse }) => {
return ( return (
<aside className={`leftbar${className ? ' ' + className : ''}${collapsed ? ' leftbar-collapsed' : ''}`} aria-label="Werkzeugpalette"> <aside className={`leftbar${className ? ' ' + className : ''}${collapsed ? ' leftbar-collapsed' : ''}`} aria-label="Werkzeugpalette">
<div className="leftbar-header"> <div className="leftbar-header">
@@ -121,21 +120,6 @@ const LeftSidebar: React.FC<LeftSidebarProps> = ({ activeTool, onToolChange, sel
</div> </div>
)} )}
<div className="tool-section" key="library">
<div className="tool-section-label">Bibliothek</div>
<BlockLibrary
blocks={blocks || []}
category="Alle"
onCategoryChange={onBlockCategoryChange ?? (() => {})}
onSearch={onBlockSearch ?? (() => {})}
onDragBlock={onDragBlock ?? (() => {})}
onRenameBlock={onRenameBlock}
onDuplicateBlock={onDuplicateBlock}
onDeleteBlock={onDeleteBlock}
onSvgImport={onSvgImport}
onSaveGroupAsBlock={onSaveGroupAsBlock}
/>
</div>
<div className="leftbar-footer"> <div className="leftbar-footer">
{onToggleCollapse && ( {onToggleCollapse && (