mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-26 07:38:33 -06:00
more centralization
This commit is contained in:
@@ -28,7 +28,7 @@ export const getAllAssignmentsQueryConfig = (
|
||||
},
|
||||
});
|
||||
|
||||
export const useAllAssignmentNamesQuery = (moduleName: string) => {
|
||||
const useAllAssignmentsQuery = (moduleName: string) => {
|
||||
const { courseName } = useCourseContext();
|
||||
return useSuspenseQuery(getAllAssignmentsQueryConfig(courseName, moduleName));
|
||||
};
|
||||
@@ -70,7 +70,7 @@ export const useAssignmentQuery = (
|
||||
};
|
||||
|
||||
export const useAssignmentsQueries = (moduleName: string) => {
|
||||
const { data: allAssignments } = useAllAssignmentNamesQuery(moduleName);
|
||||
const { data: allAssignments } = useAllAssignmentsQuery(moduleName);
|
||||
const { courseName } = useCourseContext();
|
||||
return useSuspenseQueries({
|
||||
queries: allAssignments.map((assignment) =>
|
||||
|
||||
Reference in New Issue
Block a user