working pages and app router

This commit is contained in:
2024-09-07 08:52:03 -06:00
parent 3c86d3be88
commit 5b610e2777
135 changed files with 16129 additions and 4 deletions

View File

@@ -0,0 +1,21 @@
"use client";
import { IModuleItem } from "@/models/local/IModuleItem";
import { createContext, useContext, DragEvent } from "react";
export interface DraggableItem {
item: IModuleItem;
sourceModuleName: string;
type: "quiz" | "assignment" | "page";
}
export interface DraggingContextInterface {
itemDrop: (e: DragEvent<HTMLDivElement>,droppedOnDay?: string) => void;
}
const defaultDraggingValue: DraggingContextInterface = {
itemDrop: () => { },
};
export const DraggingContext = createContext<DraggingContextInterface>(defaultDraggingValue);
export function useDraggingContext() {
return useContext(DraggingContext);
}