diff --git a/src/components/CourseGrid.tsx b/src/components/CourseGrid.tsx index 002277f..ec0c976 100644 --- a/src/components/CourseGrid.tsx +++ b/src/components/CourseGrid.tsx @@ -1,14 +1,23 @@ import CourseCard from "./CourseCard"; import { dbGetAllPublishedCourses } from "@/server/controllers/dbController"; +import Heading from "./Heading"; -export default async function CourseGrid () { +export default async function CourseGrid() { const courses = await dbGetAllPublishedCourses(); + if (courses.length === 0) { + return ( + + No courses available. Please check in at a later time. + + ); + } + return ( -
- {courses.map(course => ( +
+ {courses.map((course) => ( ))}
); -}; +}