mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-27 07:58:31 -06:00
moving v2 to top level
This commit is contained in:
22
src/app/course/[courseName]/context/calendarItemsContext.ts
Normal file
22
src/app/course/[courseName]/context/calendarItemsContext.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { LocalAssignment } from "@/models/local/assignment/localAssignment";
|
||||
import { LocalCoursePage } from "@/models/local/page/localCoursePage";
|
||||
import { LocalQuiz } from "@/models/local/quiz/localQuiz";
|
||||
import { createContext, useContext } from "react";
|
||||
|
||||
export interface CalendarItemsInterface {
|
||||
[
|
||||
key: string // representing a date
|
||||
]: {
|
||||
[moduleName: string]: {
|
||||
assignments: LocalAssignment[];
|
||||
quizzes: LocalQuiz[];
|
||||
pages: LocalCoursePage[];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
export const CalendarItemsContext = createContext<CalendarItemsInterface>({});
|
||||
|
||||
export function useCalendarItemsContext() {
|
||||
return useContext(CalendarItemsContext);
|
||||
}
|
||||
Reference in New Issue
Block a user