import React from 'react';
import WechatCourseCard from './WechatCourseCard';

// 课程列表
const WechatCoursesList = ({ coursesData, subsetTab, getCourses }) => {
  if (coursesData == null || coursesData.length === 0) return <div></div>;
  return (
    <div className='w-full grid grid-cols-2 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-2 lg:gap-4'>
      {coursesData.map((course) => (
        <WechatCourseCard
          key={course.Code}
          course={course}
          subsetTab={subsetTab}
          getCourses={getCourses}
        />
      ))}
    </div>
  );
};

export default WechatCoursesList;
