From 929a0cf2640e44ffac2f2aae480824ae2992f48f Mon Sep 17 00:00:00 2001 From: Claire Chabas Date: Thu, 22 May 2025 13:42:37 +0200 Subject: [PATCH] Clean --- packages/gitbook/src/components/utils/ZoomImage.tsx | 4 ---- 1 file changed, 4 deletions(-) diff --git a/packages/gitbook/src/components/utils/ZoomImage.tsx b/packages/gitbook/src/components/utils/ZoomImage.tsx index f29d7e055..9cc56326f 100644 --- a/packages/gitbook/src/components/utils/ZoomImage.tsx +++ b/packages/gitbook/src/components/utils/ZoomImage.tsx @@ -32,9 +32,6 @@ export function ZoomImage( return; } - const imageWidth = typeof width === 'number' ? width : 0; - let viewWidth = 0; - const mediaQueryList = window.matchMedia('(min-width: 768px)'); const resizeObserver = typeof ResizeObserver !== 'undefined' @@ -44,7 +41,6 @@ export function ZoomImage( // Since the image is removed from the DOM when the modal is opened, // We only care when the size is defined. if (imgEntry && imgEntry.contentRect.width !== 0) { - viewWidth = entries[0]?.contentRect.width; setPlaceholderRect(entries[0].contentRect); onChange(); }