Commit 2f6963d
fix: handle empty coursesToMajors in Courses component (#412)
This pull request updates the rendering logic for the courses table in
`app/[locale]/academics/curricula/page.tsx`. The main improvement is
ensuring that courses with no associated majors are still displayed in
the table, preventing them from being omitted.
Rendering improvements:
* Courses that have no entries in `coursesToMajors` are now rendered as
a single row with just their `code` and `title`, ensuring all courses
are shown in the table.
([app/[locale]/academics/curricula/page.tsxL93-R102](diffhunk://#diff-f28e90cdfc2124ecddf73b3a9d4522b6270d42112fa9b8a81c67656ed7722c86L93-R102))
* The mapping logic for rendering table rows has been refactored to
handle the case where `coursesToMajors` is empty, improving code
readability and correctness.
([app/[locale]/academics/curricula/page.tsxL116-R124](diffhunk://#diff-f28e90cdfc2124ecddf73b3a9d4522b6270d42112fa9b8a81c67656ed7722c86L116-R124))1 parent 5d9560b commit 2f6963d
1 file changed
+11
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
94 | | - | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
95 | 103 | | |
96 | 104 | | |
97 | 105 | | |
| |||
113 | 121 | | |
114 | 122 | | |
115 | 123 | | |
116 | | - | |
| 124 | + | |
117 | 125 | | |
0 commit comments