Skip to content

Commit bdfca5b

Browse files
committed
fix carousel error
1 parent cb4961f commit bdfca5b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

frontend/src/Components/ViewPage/ViewPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -743,7 +743,7 @@ const Carousel = (props: any) => {
743743
};
744744
}, [swiperRef.current])
745745

746-
const slide = useMemo(() => makeSlides(props.photos.slice(Math.max(0, props.index - RANGE), Math.min(props.index + RANGE, props.photos.length)), swiperRef, props.goBack, props.mouseLeft, props.mouseCenter, props.mouseRight, zoomedRef), [props.photos, props.open, key]);
746+
const slide = useMemo(() => makeSlides(props.photos.slice(Math.max(0, props.index - RANGE), Math.min(props.index + RANGE, props.photos.length)), swiperRef, props.goBack, props.mouseLeft, props.mouseCenter, props.mouseRight, zoomedRef), [props.photos, key]);
747747

748748
useEffect(() => {
749749
setIndex(props.index);

0 commit comments

Comments
 (0)