mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 12:24:38 +03:00
@@ -10,7 +10,6 @@ import {
|
||||
} from "react-bootstrap";
|
||||
import cx from "classnames";
|
||||
import Mousetrap from "mousetrap";
|
||||
import debounce from "lodash-es/debounce";
|
||||
|
||||
import { Icon } from "src/components/Shared/Icon";
|
||||
import { LoadingIndicator } from "src/components/Shared/LoadingIndicator";
|
||||
@@ -45,6 +44,7 @@ import {
|
||||
faTimes,
|
||||
} from "@fortawesome/free-solid-svg-icons";
|
||||
import { RatingSystem } from "src/components/Shared/Rating/RatingSystem";
|
||||
import { useDebounce } from "../debounce";
|
||||
|
||||
const CLASSNAME = "Lightbox";
|
||||
const CLASSNAME_HEADER = `${CLASSNAME}-header`;
|
||||
@@ -197,8 +197,9 @@ export const LightboxComponent: React.FC<IProps> = ({
|
||||
}
|
||||
}, [isSwitchingPage, images, index]);
|
||||
|
||||
const disableInstantTransition = debounce(
|
||||
const disableInstantTransition = useDebounce(
|
||||
() => setInstantTransition(false),
|
||||
[],
|
||||
400
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user