mirror of
https://github.com/stashapp/stash.git
synced 2025-12-06 08:26:00 +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 { useLightbox } from "src/hooks/Lightbox/hooks";
|
||||
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 {
|
||||
CriterionModifier,
|
||||
|
|
@ -45,9 +45,9 @@ export const GalleryViewer: React.FC<IProps> = ({ galleryId }) => {
|
|||
}, [images]);
|
||||
|
||||
const showLightbox = useLightbox(lightboxState);
|
||||
const showLightboxOnClick = useCallback(
|
||||
const showLightboxOnClick: PhotoClickHandler = useCallback(
|
||||
(event, { index }) => {
|
||||
showLightbox(index);
|
||||
showLightbox({ initialIndex: index });
|
||||
},
|
||||
[showLightbox]
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in a new issue