mirror of
https://github.com/stashapp/stash.git
synced 2025-12-06 16:34:02 +01:00
Fix scene gallery viewer displaying incorrect image
This commit is contained in:
parent
2375bc6cac
commit
f9fb33e8cc
1 changed files with 3 additions and 3 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
import React, { useCallback, useMemo } from "react";
|
import React, { useCallback, useMemo } from "react";
|
||||||
import { useLightbox } from "src/hooks/Lightbox/hooks";
|
import { useLightbox } from "src/hooks/Lightbox/hooks";
|
||||||
import { LoadingIndicator } from "src/components/Shared/LoadingIndicator";
|
import { LoadingIndicator } from "src/components/Shared/LoadingIndicator";
|
||||||
import Gallery from "react-photo-gallery";
|
import Gallery, { PhotoClickHandler } from "react-photo-gallery";
|
||||||
import "flexbin/flexbin.css";
|
import "flexbin/flexbin.css";
|
||||||
import {
|
import {
|
||||||
CriterionModifier,
|
CriterionModifier,
|
||||||
|
|
@ -45,9 +45,9 @@ export const GalleryViewer: React.FC<IProps> = ({ galleryId }) => {
|
||||||
}, [images]);
|
}, [images]);
|
||||||
|
|
||||||
const showLightbox = useLightbox(lightboxState);
|
const showLightbox = useLightbox(lightboxState);
|
||||||
const showLightboxOnClick = useCallback(
|
const showLightboxOnClick: PhotoClickHandler = useCallback(
|
||||||
(event, { index }) => {
|
(event, { index }) => {
|
||||||
showLightbox(index);
|
showLightbox({ initialIndex: index });
|
||||||
},
|
},
|
||||||
[showLightbox]
|
[showLightbox]
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue