diff --git a/nextjs/src/app/course/[courseName]/ModuleList.tsx b/nextjs/src/app/course/[courseName]/ModuleList.tsx
deleted file mode 100644
index 17001fa..0000000
--- a/nextjs/src/app/course/[courseName]/ModuleList.tsx
+++ /dev/null
@@ -1,3 +0,0 @@
-export default function ModuleList() {
- return
-}
\ No newline at end of file
diff --git a/nextjs/src/app/course/[courseName]/calendar/CourseCalendar.tsx b/nextjs/src/app/course/[courseName]/calendar/CourseCalendar.tsx
index c784c6b..90604e3 100644
--- a/nextjs/src/app/course/[courseName]/calendar/CourseCalendar.tsx
+++ b/nextjs/src/app/course/[courseName]/calendar/CourseCalendar.tsx
@@ -19,10 +19,10 @@ export default function CourseCalendar() {
const months = getMonthsBetweenDates(startDateTime, endDateTime);
return (
- <>
+
{months.map((month) => (
))}
- >
+
);
}
diff --git a/nextjs/src/app/course/[courseName]/modules/ExpandableModule.tsx b/nextjs/src/app/course/[courseName]/modules/ExpandableModule.tsx
new file mode 100644
index 0000000..dd5eabd
--- /dev/null
+++ b/nextjs/src/app/course/[courseName]/modules/ExpandableModule.tsx
@@ -0,0 +1,11 @@
+import { LocalModule } from "@/models/local/localModules";
+import React from "react";
+
+export default function ExpandableModule({ module }: { module: LocalModule }) {
+ return (
+
+ {module.name}
+ expanded details
+
+ );
+}
diff --git a/nextjs/src/app/course/[courseName]/modules/ModuleList.tsx b/nextjs/src/app/course/[courseName]/modules/ModuleList.tsx
new file mode 100644
index 0000000..2c8a180
--- /dev/null
+++ b/nextjs/src/app/course/[courseName]/modules/ModuleList.tsx
@@ -0,0 +1,16 @@
+"use client";
+import { useCourseContext } from "../context/courseContext";
+import ExpandableModule from "./ExpandableModule";
+
+export default function ModuleList() {
+ const {
+ localCourse: { modules },
+ } = useCourseContext();
+ return (
+
+ {modules.map((m) => (
+
+ ))}
+
+ );
+}
diff --git a/nextjs/src/app/course/[courseName]/page.tsx b/nextjs/src/app/course/[courseName]/page.tsx
index 2ae4538..b15df8b 100644
--- a/nextjs/src/app/course/[courseName]/page.tsx
+++ b/nextjs/src/app/course/[courseName]/page.tsx
@@ -3,7 +3,7 @@ import CourseContextProvider from "./context/CourseContextProvider";
import CourseCalendar from "./calendar/CourseCalendar";
import { HydrationBoundary } from "@tanstack/react-query";
import CourseSettings from "./CourseSettings";
-import ModuleList from "./ModuleList";
+import ModuleList from "./modules/ModuleList";
export default async function CoursePage({
params: { courseName },
@@ -14,13 +14,13 @@ export default async function CoursePage({
return (
-
+
-
-
+
+
-
diff --git a/nextjs/src/app/layout.tsx b/nextjs/src/app/layout.tsx
index dd51ed9..2ee9214 100644
--- a/nextjs/src/app/layout.tsx
+++ b/nextjs/src/app/layout.tsx
@@ -25,7 +25,7 @@ export default function RootLayout({
return (
- {children}
+ {children}
);