mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-01-11 20:00:29 +01:00
Fix resize observer
This commit is contained in:
@@ -22,7 +22,7 @@ const drag = { gridArea: 'drag' };
|
||||
const DEFAULT = 0.5;
|
||||
const MIN_WIDTH_PX = 10;
|
||||
const MIN_HEIGHT_PX = 30;
|
||||
const STACK_VERTICAL_WIDTH = 600;
|
||||
const STACK_VERTICAL_WIDTH = 700;
|
||||
|
||||
export const RequestResponse = memo(function RequestResponse({ style }: Props) {
|
||||
const containerRef = useRef<HTMLDivElement>(null);
|
||||
@@ -37,9 +37,8 @@ export const RequestResponse = memo(function RequestResponse({ style }: Props) {
|
||||
null,
|
||||
);
|
||||
|
||||
useResizeObserver(containerRef, ({ contentRect }) => {
|
||||
const doIt = contentRect.width < STACK_VERTICAL_WIDTH;
|
||||
setVertical(doIt);
|
||||
useResizeObserver(containerRef.current, ({ contentRect }) => {
|
||||
setVertical(contentRect.width < STACK_VERTICAL_WIDTH);
|
||||
});
|
||||
|
||||
const styles = useMemo<CSSProperties>(
|
||||
|
||||
@@ -109,7 +109,7 @@ export function SettingsDropdown() {
|
||||
},
|
||||
]}
|
||||
>
|
||||
<IconButton size="sm" title="Main Menu" icon="hamburger" className="pointer-events-auto" />
|
||||
<IconButton size="sm" title="Main Menu" icon="gear" className="pointer-events-auto" />
|
||||
</Dropdown>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ESNext",
|
||||
"target": "es2021",
|
||||
"useDefineForClassFields": true,
|
||||
"lib": ["DOM", "DOM.Iterable", "ESNext"],
|
||||
"allowJs": false,
|
||||
|
||||
Reference in New Issue
Block a user