"use client"; import CustomButton from "./CustomButton"; import { useRef, useEffect, useState } from 'react'; import Image from 'next/image'; import { CoursesProps, CoursesArrayProps } from "@/types"; import CustomButtom from "./CustomButton"; import "slick-carousel/slick/slick.css"; import "slick-carousel/slick/slick-theme.css"; import Slider from "react-slick"; import './slick.css' import { GoDot } from "react-icons/go"; //npm i --save-dev @types/react-slick const CoursesSilder = ({ courses }: { courses: CoursesProps[] }) => { var 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;