We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 969cfa8 commit 929a0cfCopy full SHA for 929a0cf
packages/gitbook/src/components/utils/ZoomImage.tsx
@@ -32,9 +32,6 @@ export function ZoomImage(
32
return;
33
}
34
35
- const imageWidth = typeof width === 'number' ? width : 0;
36
- let viewWidth = 0;
37
-
38
const mediaQueryList = window.matchMedia('(min-width: 768px)');
39
const resizeObserver =
40
typeof ResizeObserver !== 'undefined'
@@ -44,7 +41,6 @@ export function ZoomImage(
44
41
// Since the image is removed from the DOM when the modal is opened,
45
42
// We only care when the size is defined.
46
43
if (imgEntry && imgEntry.contentRect.width !== 0) {
47
- viewWidth = entries[0]?.contentRect.width;
48
setPlaceholderRect(entries[0].contentRect);
49
onChange();
50
0 commit comments