upd cards

This commit is contained in:
Flatlogic Bot 2025-05-13 22:33:32 +00:00
parent 7c2b2e4a07
commit a0d7c514b7
2 changed files with 15 additions and 1 deletions

File diff suppressed because one or more lines are too long

View File

@ -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>
))}