Code: Select all
const videoRef = useRef(null);
function pauseVideo() {
videoRef.current.pause()
}
function openModal(url, index) {
setImageUrl(url);
setActiveIndex(index);
setIsOpen(true);
}
{
openModal(communityImages, index);
pauseVideo();
}}
>
Code: Select all
const videoRef = useRef(null);
function pauseVideo() {
videoRef.current.pause()
}
function openModal(url, index) {
setImageUrl(url);
setActiveIndex(index);
setIsOpen(true);
}
{
openModal(communityImages, index);
pauseVideo();
}}
>