mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-03 21:03:08 +00:00
♻️ refactor: extract Phase 1 hooks from sidebar (2187→2099 lines)
Extract 3 simple hooks with no UI dependencies: - use-theme-preview.ts: Debounced theme preview on hover - use-sidebar-auto-collapse.ts: Auto-collapse on small screens - use-drag-and-drop.ts: Project reordering drag-and-drop Benefits: - Reduced sidebar.tsx by 88 lines (-4%) - Improved testability (hooks can be tested in isolation) - Removed unused imports (DragEndEvent, PointerSensor, useSensor, useSensors) - Created hooks/ barrel export pattern Next steps: Extract 10+ remaining hooks and 10+ UI sections to reach target of 200-300 lines (current: 2099 lines, need to reduce ~1800 more) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
3
apps/ui/src/components/layout/sidebar/hooks/index.ts
Normal file
3
apps/ui/src/components/layout/sidebar/hooks/index.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
export { useThemePreview } from './use-theme-preview';
|
||||
export { useSidebarAutoCollapse } from './use-sidebar-auto-collapse';
|
||||
export { useDragAndDrop } from './use-drag-and-drop';
|
||||
Reference in New Issue
Block a user