upd cards
This commit is contained in:
parent
7c2b2e4a07
commit
a0d7c514b7
File diff suppressed because one or more lines are too long
@ -40,6 +40,19 @@ export default function CoursesPage() {
|
||||
{courses.map((course) => (
|
||||
<div key={course.id} className="bg-gray-100 p-4 rounded shadow">
|
||||
<h3 className="text-lg font-semibold">{course.title}</h3>
|
||||
{course.instructors && course.instructors.length > 0 && (
|
||||
<div className="mt-2">
|
||||
<h4 className="text-sm font-semibold">Instructors:</h4>
|
||||
<p className="text-gray-600">{course.instructors.map(i => i.first_name + ' ' + i.last_name).join(', ')}</p>
|
||||
</div>
|
||||
)}
|
||||
{course.students && course.students.length > 0 && (
|
||||
<div className="mt-2">
|
||||
<h4 className="text-sm font-semibold">Students:</h4>
|
||||
<p className="text-gray-600">{course.students.length} students</p>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<p className="text-gray-700">{course.description}</p>
|
||||
</div>
|
||||
))}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user