🚨(frontend) fix warning resizable panel

We had a warning in the console about the
resizable panel component.
This commit fixes that warning by ensuring that the
size is never inferior to the minimum size.
This commit is contained in:
Anthony LC
2026-01-15 22:41:10 +01:00
parent 3b80ac7b4e
commit 8ec89a8348

View File

@@ -72,7 +72,14 @@ export const ResizableLeftPanel = ({
<Panel
ref={ref}
order={0}
defaultSize={isDesktop ? panelSizePercent : 0}
defaultSize={
isDesktop
? Math.max(
minPanelSizePercent,
Math.min(panelSizePercent, maxPanelSizePercent),
)
: 0
}
minSize={isDesktop ? minPanelSizePercent : 0}
maxSize={isDesktop ? maxPanelSizePercent : 0}
onResize={handleResize}