21 lines
555 B
JavaScript
21 lines
555 B
JavaScript
import { useQuery } from "@tanstack/react-query";
|
|
|
|
export const getUnlinkedProjects = async () => {
|
|
const response = await fetch('http://localhost:8080/SonyMusicRights/unlinked-project?searchBy=');
|
|
if (!response.ok) {
|
|
throw new Error('Failed to get UploadStatus data');
|
|
}
|
|
const UnlinkedProjectsdata = await response.json();
|
|
return UnlinkedProjectsdata;
|
|
};
|
|
|
|
export const useGetUnlinkedProjects = () => {
|
|
return useQuery({
|
|
queryKey: ['UnlinkedProject-list'],
|
|
queryFn: getUnlinkedProjects,
|
|
});
|
|
};
|
|
|
|
|
|
|