diff --git a/src/components/PhotoSwipe/PhotoSwipe.tsx b/src/components/PhotoSwipe/PhotoSwipe.tsx index b39c45735..4ec75fdde 100644 --- a/src/components/PhotoSwipe/PhotoSwipe.tsx +++ b/src/components/PhotoSwipe/PhotoSwipe.tsx @@ -285,6 +285,12 @@ function PhotoSwipe(props: Iprops) { updateItems(items); }, [items]); + useEffect(() => { + if (photoSwipe) { + photoSwipe.options.arrowKeys = !showInfo; + } + }, [showInfo]); + function updateFavButton() { setIsFav(isInFav(this?.currItem)); }