mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-26 07:38:33 -06:00
working on settings
This commit is contained in:
16
nextjs/src/hooks/localCourse/storageDirectoryHooks.ts
Normal file
16
nextjs/src/hooks/localCourse/storageDirectoryHooks.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { axiosClient } from "@/services/axiosUtils";
|
||||
import { useSuspenseQuery } from "@tanstack/react-query";
|
||||
|
||||
export const directoryKeys = {
|
||||
emptyFolders: ["empty folders"] as const,
|
||||
};
|
||||
|
||||
export const useEmptyDirectoriesQuery = () =>
|
||||
useSuspenseQuery({
|
||||
queryKey: directoryKeys.emptyFolders,
|
||||
queryFn: async () => {
|
||||
const url = "/api/directories/empty";
|
||||
const { data } = await axiosClient.get<string[]>(url);
|
||||
return data;
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user