Skip to content

Commit

Permalink
Shift the div around
Browse files Browse the repository at this point in the history
  • Loading branch information
“xavilien” committed May 27, 2024
1 parent 4f2435a commit 1843da6
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions frontend/src/components/CourseList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,22 @@ const CourseList = ({ courseIDs, children }: Props) => {
return (
<div className="py-6 px-2 md:px-6">
{results.length > 0 ? (
<div className="space-y-4">
{/* We found less courses than what we search for, so put a Loading indicator */}
{courseIDs.length > results.length && <Loading />}
<>
<div className="text-gray-400 mt-3 text-sm pb-2">{courseIDs.length} Saved Courses </div>
{results.map((course) => (
<CourseCard
info={course}
key={course.courseID}
showFCEs={true}
showCourseInfo={true}
showSchedules={true}
/>
))}
</div>
<div className="space-y-4">
{/* We found less courses than what we search for, so put a Loading indicator */}
{courseIDs.length > results.length && <Loading />}
{results.map((course) => (
<CourseCard
info={course}
key={course.courseID}
showFCEs={true}
showCourseInfo={true}
showSchedules={true}
/>
))}
</div>
</>
) : (
children
)}
Expand Down

0 comments on commit 1843da6

Please sign in to comment.