"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' import Link from "next/link"; //npm i --save-dev @types/react-slick const CoursesSilder = ({ courses }: { courses: CoursesProps[] }) => { const settings = { arrows: false, 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.images.length > 0 ? ( Course Image ) : ( Course Image )}

{course.title}

{course.sort_description}

{"了解更多"}
{course.images.length > 0 ? ( Course Image ) : ( Course Image )}

{course.title}

{course.sort_description}

{"了解更多"}
) })}
) : (
)}
) } export default CoursesSilder;