Skip to content

Commit

Permalink
fix resising bug
Browse files Browse the repository at this point in the history
  • Loading branch information
samlhuillier committed Nov 2, 2024
1 parent 63dc402 commit 7034a3b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/MainPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ const MainPageContent: React.FC = () => {
const { setShowEditor, showEditor } = useContentContext()
const { getShortcutDescription } = useAppShortcuts()

const panelGroupKey = `${showChatbot}-${showEditor}-${!!currentlyOpenFilePath}`

return (
<div className="relative flex h-screen flex-col overflow-hidden">
<TitleBar similarFilesOpen={showSimilarFiles} toggleSimilarFiles={() => setShowSimilarFiles(!showSimilarFiles)} />
Expand All @@ -86,7 +88,7 @@ const MainPageContent: React.FC = () => {
<ResizablePanel defaultSize={80}>
<div className="size-full">
{currentlyOpenFilePath || showChatbot ? (
<ResizablePanelGroup direction="horizontal" className="size-full">
<ResizablePanelGroup direction="horizontal" className="size-full" key={panelGroupKey}>
{currentlyOpenFilePath && showEditor && (
<>
<ResizablePanel defaultSize={65}>
Expand Down

0 comments on commit 7034a3b

Please sign in to comment.