Skip to content

Commit

Permalink
Hide similar courses for no data
Browse files Browse the repository at this point in the history
  • Loading branch information
jacquelinecai committed Dec 5, 2024
1 parent 68659b8 commit 95615c6
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions client/src/modules/Course/Components/Course.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -266,11 +266,13 @@ export const Course = () => {
difficulty={selectedClass.classDifficulty}
workload={selectedClass.classWorkload}
/>
<SimilarCoursesSection
similarCourses={similarCourses}
bear={bear}
isVisible={screenWidth > 768}
/>
{similarCourses && similarCourses.length > 0 && (
<SimilarCoursesSection
similarCourses={similarCourses}
bear={bear}
isVisible={screenWidth > 768}
/>
)}

</div>
</div>
Expand Down Expand Up @@ -302,11 +304,13 @@ export const Course = () => {
/>
</div>
</div >
<SimilarCoursesSection
similarCourses={similarCourses}
bear={bear}
isVisible={screenWidth <= 768}
/>
{similarCourses && similarCourses.length > 0 && (
<SimilarCoursesSection
similarCourses={similarCourses}
bear={bear}
isVisible={screenWidth <= 768}
/>
)}
</div >
</div>

Expand Down

0 comments on commit 95615c6

Please sign in to comment.