You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ctk/services/frontend/src/hooks/useProject.ts

17 lines
358 B
TypeScript

import axios from "axios"
const useProject = (uuid?: string) => {
return useQuery(["project", uuid], async () => {
if (!uuid) {
return;
}
const { data } = await axios.get(`${API_SERVER_URL}/projects/${uuid}/`, {
headers: {
"Content-Type": "application/json"
}
})
return data
})
}
export default useProject;