diff --git a/apps/scandic-web/components/Carousel/CarouselContent.tsx b/apps/scandic-web/components/Carousel/CarouselContent.tsx index f54cedeed..2fff8c089 100644 --- a/apps/scandic-web/components/Carousel/CarouselContent.tsx +++ b/apps/scandic-web/components/Carousel/CarouselContent.tsx @@ -1,7 +1,6 @@ "use client" import { cx } from "class-variance-authority" -import { useEffect, useState } from "react" import { useCarousel } from "./CarouselContext" @@ -12,21 +11,11 @@ export function CarouselContent({ children, ...props }: React.HTMLAttributes) { - const { carouselRef, canScrollNext, canScrollPrev } = useCarousel() - const [isOneItem, setIsOneItem] = useState(false) - - useEffect(() => { - setIsOneItem(!canScrollPrev() && !canScrollNext()) - }, [canScrollPrev, canScrollNext]) + const { carouselRef } = useCarousel() return (
-
+
{children}
diff --git a/apps/scandic-web/components/Carousel/carousel.module.css b/apps/scandic-web/components/Carousel/carousel.module.css index e902f3846..ef10b75a9 100644 --- a/apps/scandic-web/components/Carousel/carousel.module.css +++ b/apps/scandic-web/components/Carousel/carousel.module.css @@ -13,10 +13,6 @@ gap: var(--Spacing-x2); } -.centerContent { - justify-content: center; -} - .item { min-width: 0; } diff --git a/apps/scandic-web/components/ContentType/DestinationPage/HotelCardCarousel/index.tsx b/apps/scandic-web/components/ContentType/DestinationPage/HotelCardCarousel/index.tsx index 77ff3aa95..f3a06f58d 100644 --- a/apps/scandic-web/components/ContentType/DestinationPage/HotelCardCarousel/index.tsx +++ b/apps/scandic-web/components/ContentType/DestinationPage/HotelCardCarousel/index.tsx @@ -29,6 +29,7 @@ export default function HotelCardCarousel({ className={styles.carousel} scrollToIdx={selectedHotelIdx} align="center" + opts={{ containScroll: false }} > {visibleHotels.map(({ hotel, url }) => (