React : ignore the onClick event when scrolling-y

I’m using the embla-carousel plugin to create a carousel and I want to ignore the onClick event, which links to another page, when I scroll horizontally.
enter image description here

Source: Ask Javascript Questions

LEAVE A COMMENT