diff --git a/apps/renderer/package.json b/apps/renderer/package.json index ba27eeb76e..189734a5bc 100644 --- a/apps/renderer/package.json +++ b/apps/renderer/package.json @@ -85,7 +85,6 @@ "react-selecto": "^1.26.3", "react-shadow": "20.5.0", "react-virtuoso": "4.12.0", - "react-zoom-pan-pinch": "^3.6.1", "rehype-infer-description-meta": "2.0.0", "rehype-parse": "9.0.1", "rehype-sanitize": "6.0.0", diff --git a/apps/renderer/src/components/ui/media/preview-media.tsx b/apps/renderer/src/components/ui/media/preview-media.tsx index 0d2554e65e..c81de0dfbe 100644 --- a/apps/renderer/src/components/ui/media/preview-media.tsx +++ b/apps/renderer/src/components/ui/media/preview-media.tsx @@ -8,7 +8,6 @@ import type { FC } from "react" import { Fragment, useCallback, useEffect, useRef, useState } from "react" import { Blurhash } from "react-blurhash" import { useTranslation } from "react-i18next" -import { TransformComponent, TransformWrapper } from "react-zoom-pan-pinch" import { Keyboard, Mousewheel } from "swiper/modules" import type { SwiperRef } from "swiper/react" import { Swiper, SwiperSlide } from "swiper/react" @@ -323,63 +322,48 @@ const FallbackableImage: FC< const { height: windowHeight, width: windowWidth } = useWindowSize() - const wrapperClass = cn("relative !max-h-full", width <= height && "!h-full") - const wrapperStyle = { - // px-20 pb-8 pt-10 - width: - width && height && width > height - ? `${Math.min((windowHeight - 32 - 40) * (width / height), width)}px` - : undefined, - maxWidth: width > height ? `${windowWidth - 80 - 80 - 400}px` : undefined, - } - return ( -