mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-19 09:50:15 +01:00
🔧 fix: Artifacts Display Crash on Close and Max Width (#7540)
* 🔧 chore: Update react-resizable-panels dependency to version 3.0.2 in package.json and package-lock.json
* fix: Simplify order assignment in SidePanel component based on hasArtifacts condition, fixed frontend crash when artifacts are closed
* refactor: Change throttledSaveLayout to use useMemo for improved performance in SidePanelGroup component
* refactor: Update dependencies in SidePanel component's useEffect hooks for improved responsiveness
This commit is contained in:
parent
449d9b7613
commit
fc8d24fa5b
4 changed files with 31 additions and 20 deletions
|
|
@ -78,7 +78,7 @@ const SidePanel = ({
|
|||
setFullCollapse(true);
|
||||
localStorage.setItem('fullPanelCollapse', 'true');
|
||||
panelRef.current?.collapse();
|
||||
}, []);
|
||||
}, [panelRef, setMinSize, setIsCollapsed, setFullCollapse, setCollapsedSize]);
|
||||
|
||||
const Links = useSideNavLinks({
|
||||
endpoint,
|
||||
|
|
@ -107,7 +107,17 @@ const SidePanel = ({
|
|||
} else {
|
||||
panelRef.current?.expand();
|
||||
}
|
||||
}, [isCollapsed, newUser, setNewUser, navCollapsedSize]);
|
||||
}, [
|
||||
newUser,
|
||||
panelRef,
|
||||
setNewUser,
|
||||
setMinSize,
|
||||
isCollapsed,
|
||||
setIsCollapsed,
|
||||
setFullCollapse,
|
||||
setCollapsedSize,
|
||||
navCollapsedSize,
|
||||
]);
|
||||
|
||||
return (
|
||||
<>
|
||||
|
|
@ -137,7 +147,7 @@ const SidePanel = ({
|
|||
<ResizablePanel
|
||||
tagName="nav"
|
||||
id="controls-nav"
|
||||
order={hasArtifacts != null ? 3 : 2}
|
||||
order={hasArtifacts ? 3 : 2}
|
||||
aria-label={localize('com_ui_controls')}
|
||||
role="navigation"
|
||||
collapsedSize={collapsedSize}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue