mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-25 23:28:33 -06:00
updating drag and drop styling
This commit is contained in:
@@ -94,10 +94,12 @@ export const useUpdateAssignmentMutation = () => {
|
||||
mutationFn: async ({
|
||||
assignment,
|
||||
moduleName,
|
||||
previousModuleName,
|
||||
assignmentName,
|
||||
}: {
|
||||
assignment: LocalAssignment;
|
||||
moduleName: string;
|
||||
previousModuleName: string;
|
||||
assignmentName: string;
|
||||
}) => {
|
||||
queryClient.setQueryData(
|
||||
@@ -111,7 +113,7 @@ export const useUpdateAssignmentMutation = () => {
|
||||
encodeURIComponent(moduleName) +
|
||||
"/assignments/" +
|
||||
encodeURIComponent(assignmentName);
|
||||
await axiosClient.put(url, assignment);
|
||||
await axiosClient.put(url, { assignment, previousModuleName });
|
||||
},
|
||||
onSuccess: (_, { moduleName, assignmentName }) => {
|
||||
queryClient.invalidateQueries({
|
||||
@@ -128,7 +130,6 @@ export const useUpdateAssignmentMutation = () => {
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
export const useCreateAssignmentMutation = () => {
|
||||
const { courseName } = useCourseContext();
|
||||
const queryClient = useQueryClient();
|
||||
@@ -169,4 +170,3 @@ export const useCreateAssignmentMutation = () => {
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user