lots of hooks

This commit is contained in:
2024-08-30 11:25:23 -06:00
parent d975add636
commit 09f911c18a
12 changed files with 219 additions and 107 deletions

View File

@@ -1,14 +1,17 @@
"use client";
import { useModuleNamesQuery } from "@/hooks/localCourse/localCoursesHooks";
import { useCourseContext } from "../context/courseContext";
import ExpandableModule from "./ExpandableModule";
export default function ModuleList() {
const { courseName } = useCourseContext();
const { data: moduleNames } = useModuleNamesQuery(courseName);
return (
<div>
modules here
{/* {modules.map((m) => (
<ExpandableModule key={m.name} module={m} />
))} */}
{moduleNames.map((m) => (
<ExpandableModule key={m} moduleName={m}/>
))}
</div>
);
}