mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-25 23:28:33 -06:00
better matching
This commit is contained in:
10
nextjs/src/hooks/hookHydration.ts
Normal file
10
nextjs/src/hooks/hookHydration.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { QueryClient } from "@tanstack/react-query";
|
||||
import { localCourseKeys } from "./localCoursesHooks";
|
||||
import { fileStorageService } from "@/services/fileStorage/fileStorageService";
|
||||
|
||||
export const hydrateCourses = async (queryClient: QueryClient) => {
|
||||
await queryClient.prefetchQuery({
|
||||
queryKey: localCourseKeys.allCourses,
|
||||
queryFn: async () => await fileStorageService.loadSavedCourses(),
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user