Skip to content

Commit 7034a3b

Browse files
committed
fix resising bug
1 parent 63dc402 commit 7034a3b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/components/MainPage.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ const MainPageContent: React.FC = () => {
6666
const { setShowEditor, showEditor } = useContentContext()
6767
const { getShortcutDescription } = useAppShortcuts()
6868

69+
const panelGroupKey = `${showChatbot}-${showEditor}-${!!currentlyOpenFilePath}`
70+
6971
return (
7072
<div className="relative flex h-screen flex-col overflow-hidden">
7173
<TitleBar similarFilesOpen={showSimilarFiles} toggleSimilarFiles={() => setShowSimilarFiles(!showSimilarFiles)} />
@@ -86,7 +88,7 @@ const MainPageContent: React.FC = () => {
8688
<ResizablePanel defaultSize={80}>
8789
<div className="size-full">
8890
{currentlyOpenFilePath || showChatbot ? (
89-
<ResizablePanelGroup direction="horizontal" className="size-full">
91+
<ResizablePanelGroup direction="horizontal" className="size-full" key={panelGroupKey}>
9092
{currentlyOpenFilePath && showEditor && (
9193
<>
9294
<ResizablePanel defaultSize={65}>

0 commit comments

Comments
 (0)