Merge branch 'main' of http://113.45.157.195:3003/insiinc/re-mooc
This commit is contained in:
commit
7597018c2e
|
@ -41,7 +41,7 @@ export default function CourseCard({ course }: CourseCardProps) {
|
|||
}>
|
||||
<div className="px-4">
|
||||
<div className="flex gap-2 mb-4">
|
||||
{course.terms.map((term) => {
|
||||
{course?.terms?.map((term) => {
|
||||
return (
|
||||
<Tag
|
||||
key={term.id}
|
||||
|
@ -85,7 +85,7 @@ export default function CourseCard({ course }: CourseCardProps) {
|
|||
<TeamOutlined className="text-blue-500 text-lg transform group-hover:scale-110 transition-transform duration-300" />
|
||||
<div className="ml-2 flex items-center flex-grow">
|
||||
<Text className="font-medium text-blue-500 hover:text-blue-600 transition-colors duration-300 truncate max-w-[120px]">
|
||||
{(course.depts.map((depts)=>depts.name))}
|
||||
{(course?.depts?.map((depts)=>depts.name))}
|
||||
{/* {course?.depts?.[0]?.name} */}
|
||||
</Text>
|
||||
</div>
|
||||
|
|
|
@ -123,8 +123,8 @@ const CoursesSection: React.FC<CoursesSectionProps> = ({
|
|||
{isDataLoading ? (
|
||||
<Spin className="m-3" />
|
||||
) : (
|
||||
displayedCourses?.map((course) => (
|
||||
<CourseCard course={course}></CourseCard>
|
||||
displayedCourses?.map((course,index) => (
|
||||
<CourseCard course={course} key={index}></CourseCard>
|
||||
))
|
||||
)}
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue