import { Swiper, SwiperSlide } from "swiper/react"; import ProductCard from "./ProductCard"; import "swiper/css"; import Image from "../elements/Image"; import Link from "../elements/Link"; import { SkeletonProduct } from "../elements/Skeleton"; import { useState } from "react"; export default function ProductSlider({ products, simpleProductTitleLine = false, bannerMode = false }) { const [ activeIndex, setActiveIndex ] = useState(0); const swiperSliderFirstMove = (swiper) => { setActiveIndex(swiper.activeIndex); }; return ( <> { bannerMode && ( {products.banner.name} 0 ? 'opacity-0' : 'opacity-100')} /> ) } { bannerMode && ( ) } {products?.products?.map((product, index) => ( ))} { !products ? : ''} ) }