From 9a3d810421fc8b6909df551a1dc36b39d7114a6a Mon Sep 17 00:00:00 2001 From: Li1304553726 <1304553726@qq.com> Date: Tue, 25 Feb 2025 19:08:30 +0800 Subject: [PATCH] Li --- apps/web/src/app/main/courses/components/CourseCard.tsx | 4 ++-- apps/web/src/app/main/home/components/CoursesSection.tsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/web/src/app/main/courses/components/CourseCard.tsx b/apps/web/src/app/main/courses/components/CourseCard.tsx index c860934..16b7a2b 100755 --- a/apps/web/src/app/main/courses/components/CourseCard.tsx +++ b/apps/web/src/app/main/courses/components/CourseCard.tsx @@ -41,7 +41,7 @@ export default function CourseCard({ course }: CourseCardProps) { }>
- {course.terms.map((term) => { + {course?.terms?.map((term) => { return (
- {(course.depts.map((depts)=>depts.name))} + {(course?.depts?.map((depts)=>depts.name))} {/* {course?.depts?.[0]?.name} */}
diff --git a/apps/web/src/app/main/home/components/CoursesSection.tsx b/apps/web/src/app/main/home/components/CoursesSection.tsx index fc00aef..61948a1 100755 --- a/apps/web/src/app/main/home/components/CoursesSection.tsx +++ b/apps/web/src/app/main/home/components/CoursesSection.tsx @@ -123,8 +123,8 @@ const CoursesSection: React.FC = ({ {isDataLoading ? ( ) : ( - displayedCourses?.map((course) => ( - + displayedCourses?.map((course,index) => ( + )) )}