diff --git a/src/components/posters/zoom-image.tsx b/src/components/posters/zoom-image.tsx index f75a9549..34cf832b 100644 --- a/src/components/posters/zoom-image.tsx +++ b/src/components/posters/zoom-image.tsx @@ -1,12 +1,12 @@ "use client"; import React, { useCallback } from "react"; +import { useZoomStore } from "~/store/zoomStore"; +import { ErrorBoundary } from "react-error-boundary"; import { Controlled as ControlledZoom } from "react-medium-image-zoom"; import "react-medium-image-zoom/dist/styles.css"; -import { useZoomStore } from "~/store/zoomStore"; - type ZoomImageProps = { imageUrl: string; alt: string; @@ -26,15 +26,22 @@ const ZoomImage = ({ imageUrl, alt }: ZoomImageProps) => { ); return ( -
- - {alt} - -
+ { + resetErrorBoundary(); + return null; + }} + > +
+ + {alt} + +
+
); };