mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-26 07:38:33 -06:00
back to the good old days
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
"use client"
|
||||
import { ReactNode } from "react";
|
||||
import { CourseContext } from "./courseContext";
|
||||
import { useLocalCourseDetailsQuery } from "@/hooks/localCoursesHooks";
|
||||
|
||||
export default function CourseContextProvider({
|
||||
localCourseName,
|
||||
children,
|
||||
}: {
|
||||
children: ReactNode;
|
||||
localCourseName: string;
|
||||
}) {
|
||||
const { data: course } = useLocalCourseDetailsQuery(localCourseName);
|
||||
return (
|
||||
<CourseContext.Provider value={{ localCourse: course }}>
|
||||
{children}
|
||||
</CourseContext.Provider>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user