Skip to content

Commit

Permalink
fix: Resolve App details image duplications
Browse files Browse the repository at this point in the history
  • Loading branch information
oyo authored Sep 13, 2024
2 parents aac007d + 7bc47bd commit f39c355
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/components/basic/ImageGallery/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ export const ImageGallery = ({
else return 3
}

const getIsInfinite = () => {
if (mobile) return gallery?.length > 1
if (tab) return gallery?.length > 2
return gallery?.length > 3
}

return (
<div className="cx-image-gallery">
{hovered && hoveredImage?.url && (
Expand All @@ -69,7 +75,7 @@ export const ImageGallery = ({
gapBetweenSlides={32}
gapCarouselTop={0}
dots={false}
infinite
infinite={getIsInfinite()}
itemHeight={maxHeight ?? 0}
itemWidth={maxWidth ?? 266}
slidesToShow={getSlidesToShow()}
Expand Down

0 comments on commit f39c355

Please sign in to comment.