From 60a13a33246ad0226a05939bab29e143448f8d8f Mon Sep 17 00:00:00 2001 From: Florian Sommariva <1926041+dtrucs@users.noreply.github.com> Date: Thu, 10 Oct 2024 14:53:41 +0200 Subject: [PATCH] Fix childrenTrek navigation if there are only 2 items --- .../DetailsTrekFamilyCarousel/DetailsTrekFamilyCarousel.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/components/pages/details/components/DetailsTrekFamilyCarousel/DetailsTrekFamilyCarousel.tsx b/frontend/src/components/pages/details/components/DetailsTrekFamilyCarousel/DetailsTrekFamilyCarousel.tsx index 8d201bca3..6f69efd2f 100644 --- a/frontend/src/components/pages/details/components/DetailsTrekFamilyCarousel/DetailsTrekFamilyCarousel.tsx +++ b/frontend/src/components/pages/details/components/DetailsTrekFamilyCarousel/DetailsTrekFamilyCarousel.tsx @@ -25,7 +25,7 @@ export const DetailsTrekFamilyCarousel: React.FC prevArrow={} nextArrow={} swipe={false} - slidesToShow={3} + slidesToShow={trekChildren.length > 2 ? 3 : 2} slidesToScroll={2} initialSlide={initialSlideId} className="my-1.5 !flex items-center desktop:my-3"