I’m using Flickity-React-Component for a swappable Carousel and passed NextJs <Link> to its children.
The problem is when click and swap the carousel, after releasing mouse click it opens that link
is there a way to force it to use single click?
Here’s my code :
<Flickity
options={{
freeScroll: true,
contain: true,
wrapAround : true,
prevNextButtons: false,
pageDots: false,
initialIndex: 2,
}}>
{slides?.length && slides.map((item, idx) => {
return (
// <Link key={`banner_${item.id}`} href={`/${item.shop_link}`}>
<div>
<Image src={item.src} />
</div>
// </Link>
)
})}
</Flickity>
sorry for my bad English
I’ve changed <Link> with onCLick event and it doesn’t work