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

@@ -50,6 +50,7 @@ export default function CourseContextProvider({
return (
<CourseContext.Provider
value={{
courseName: localCourseName,
startItemDrag: (d) => {
setItemBeingDragged(d);
},

View File

@@ -8,15 +8,17 @@ export interface DraggableItem {
}
export interface CourseContextInterface {
courseName: string;
startItemDrag: (dragging: DraggableItem) => void;
endItemDrag: () => void;
itemDrop: (droppedOnDay?: Date) => void;
}
const defaultValue: CourseContextInterface = {
startItemDrag: () => {},
endItemDrag: () => {},
itemDrop: () => {},
startItemDrag: () => { },
endItemDrag: () => { },
itemDrop: () => { },
courseName: ""
};
export const CourseContext =