🚨(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:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user