Skip to content

Commit 0a3b994

Browse files
committed
npm run prettier-fix
1 parent bff09e0 commit 0a3b994

File tree

2 files changed

+29
-5
lines changed

2 files changed

+29
-5
lines changed

client/src/App.tsx

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ import React, {
2828
useState,
2929
} from "react";
3030
import { useConnection } from "./lib/hooks/useConnection";
31-
import { useDraggablePane, useDraggableSidebar } from "./lib/hooks/useDraggablePane";
31+
import {
32+
useDraggablePane,
33+
useDraggableSidebar,
34+
} from "./lib/hooks/useDraggablePane";
3235
import { StdErrNotification } from "./lib/notificationTypes";
3336

3437
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
@@ -163,7 +166,11 @@ const App = () => {
163166
const progressTokenRef = useRef(0);
164167

165168
const { height: historyPaneHeight, handleDragStart } = useDraggablePane(300);
166-
const { width: sidebarWidth, isDragging: isSidebarDragging, handleDragStart: handleSidebarDragStart } = useDraggableSidebar(320);
169+
const {
170+
width: sidebarWidth,
171+
isDragging: isSidebarDragging,
172+
handleDragStart: handleSidebarDragStart,
173+
} = useDraggableSidebar(320);
167174

168175
const {
169176
connectionStatus,
@@ -564,7 +571,12 @@ const App = () => {
564571
return (
565572
<div className="flex h-screen bg-background">
566573
<div
567-
style={{ width: sidebarWidth, minWidth: 200, maxWidth: 600, transition: isSidebarDragging ? 'none' : 'width 0.15s' }}
574+
style={{
575+
width: sidebarWidth,
576+
minWidth: 200,
577+
maxWidth: 600,
578+
transition: isSidebarDragging ? "none" : "width 0.15s",
579+
}}
568580
className="bg-card border-r border-border flex flex-col h-full relative"
569581
>
570582
<Sidebar
@@ -596,7 +608,16 @@ const App = () => {
596608
{/* Drag handle for resizing sidebar */}
597609
<div
598610
onMouseDown={handleSidebarDragStart}
599-
style={{ cursor: 'col-resize', position: 'absolute', top: 0, right: 0, width: 6, height: '100%', zIndex: 10, background: isSidebarDragging ? 'rgba(0,0,0,0.08)' : 'transparent' }}
611+
style={{
612+
cursor: "col-resize",
613+
position: "absolute",
614+
top: 0,
615+
right: 0,
616+
width: 6,
617+
height: "100%",
618+
zIndex: 10,
619+
background: isSidebarDragging ? "rgba(0,0,0,0.08)" : "transparent",
620+
}}
600621
aria-label="Resize sidebar"
601622
data-testid="sidebar-drag-handle"
602623
/>

client/src/lib/hooks/useDraggablePane.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,10 @@ export function useDraggableSidebar(initialWidth: number) {
7272
(e: MouseEvent) => {
7373
if (!isDragging) return;
7474
const deltaX = e.clientX - dragStartX.current;
75-
const newWidth = Math.max(200, Math.min(600, dragStartWidth.current + deltaX));
75+
const newWidth = Math.max(
76+
200,
77+
Math.min(600, dragStartWidth.current + deltaX),
78+
);
7679
setWidth(newWidth);
7780
},
7881
[isDragging],

0 commit comments

Comments
 (0)