"use client"; import { CoursesProps } from "@/types"; import "slick-carousel/slick/slick.css"; import "slick-carousel/slick/slick-theme.css"; import Slider from "react-slick"; import './slick.css' //npm i --save-dev @types/react-slick const CoursesSilder = ({ courses }: { courses: CoursesProps[] }) => { const settings = { dots: true, infinite: true, speed: 500, slidesToShow: 1, slidesToScroll: 1, appendDots: (dots: any) => (
), dotsClass: 'dots_custom' }; console.log(courses) return (
{courses.length > 0 ? (
{courses.map((course, index) => { return (
Course Image

{course.title}

{course.sort_description}

Course Image

{course.title}

{course.sort_description}

) })}
) : (
)}
) } export default CoursesSilder;