fix: prevent adjacent slide peeking in ProductCard Swiper
This commit is contained in:
@@ -80,11 +80,13 @@ const ProductCardInner = ({ product, mediaHeight = 200, actions }: Props) => {
|
|||||||
{imageUrls.length ? (
|
{imageUrls.length ? (
|
||||||
<Box onMouseMove={!isMobile ? onMouseMove : undefined} sx={{ height: mediaHeight, overflow: 'hidden' }}>
|
<Box onMouseMove={!isMobile ? onMouseMove : undefined} sx={{ height: mediaHeight, overflow: 'hidden' }}>
|
||||||
<Swiper
|
<Swiper
|
||||||
|
slidesPerView={1}
|
||||||
|
spaceBetween={0}
|
||||||
|
allowTouchMove={!isMobile}
|
||||||
onSwiper={(s) => {
|
onSwiper={(s) => {
|
||||||
swiperRef.current = s
|
swiperRef.current = s
|
||||||
}}
|
}}
|
||||||
allowTouchMove={!isMobile}
|
style={{ width: '100%', height: mediaHeight, overflow: 'hidden' }}
|
||||||
style={{ width: '100%', height: mediaHeight }}
|
|
||||||
>
|
>
|
||||||
{imageUrls.map((url) => (
|
{imageUrls.map((url) => (
|
||||||
<SwiperSlide key={url}>
|
<SwiperSlide key={url}>
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user