diff --git a/frontend/src/Components/dashboard/ResidentWeeklyActivityTable.tsx b/frontend/src/Components/dashboard/ResidentWeeklyActivityTable.tsx index 4f8f7d01..fdd5e678 100644 --- a/frontend/src/Components/dashboard/ResidentWeeklyActivityTable.tsx +++ b/frontend/src/Components/dashboard/ResidentWeeklyActivityTable.tsx @@ -18,7 +18,7 @@ export default function ResidentWeeklyActivityTable({ - {courses ? ( + {courses.length > 0 ? ( courses.map( (course: RecentCourse, index: number) => { const totalTime = convertSeconds( diff --git a/frontend/src/Pages/StudentDashboard.tsx b/frontend/src/Pages/StudentDashboard.tsx index 027d65af..d03cc809 100644 --- a/frontend/src/Pages/StudentDashboard.tsx +++ b/frontend/src/Pages/StudentDashboard.tsx @@ -34,19 +34,25 @@ export default function StudentLayer2() {

Hi, {user.name_first ?? 'Student'}!

Pick Up Where You Left Off

-
- {courses - .slice(0, slice) - .map((course: RecentCourse, index: number) => { - return ( - - ); - })} -
+ {courses.length > 0 ? ( +
+ {courses + .slice(0, slice) + .map((course: RecentCourse, index: number) => { + return ( + + ); + })} +
+ ) : ( +

+ You are not currently enrolled in any courses. +

+ )} {courses.length > 4 && (