disable photoswipe keyboard event when info modal is open

This commit is contained in:
Abhinav 2021-10-30 16:04:22 +05:30
parent 4f01979b14
commit c46ba48980

View file

@ -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));
}