Skip to content

Commit

Permalink
fix carousel error
Browse files Browse the repository at this point in the history
  • Loading branch information
gregordr committed May 28, 2024
1 parent cb4961f commit bdfca5b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/src/Components/ViewPage/ViewPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,7 @@ const Carousel = (props: any) => {
};
}, [swiperRef.current])

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]);
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]);

useEffect(() => {
setIndex(props.index);
Expand Down

0 comments on commit bdfca5b

Please sign in to comment.