"use client"; import { useEffect } from "react"; import { CollectionLink } from "../CollectionLink/CollectionLink"; import { AddCollectionLink } from "../AddCollectionLink/AddCollectionLink"; import Link from "next/link"; import Styles from "./CollectionCourusel.module.css"; import Swiper from "swiper"; import "swiper/css"; import "swiper/css/navigation"; import { Navigation } from "swiper/modules"; export const CollectionCourusel = (props: { sectionTitle: string; showAllLink?: string; content: any; isMyCollections?: boolean; }) => { useEffect(() => { const options: any = { direction: "horizontal", spaceBetween: 8, allowTouchMove: true, slidesPerView: "auto", navigation: { enabled: false, nextEl: ".swiper-button-next", prevEl: ".swiper-button-prev", }, breakpoints: { 450: { navigation: { enabled: true, }, }, }, modules: [Navigation], }; new Swiper(".swiper", options); }, []); return (

{props.sectionTitle}

{props.showAllLink && (

Показать все

)}
{props.isMyCollections && (
)} {props.content.map((collection) => { return (
); })}
); };