mirror of https://github.com/ctk-hq/ctk
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.
17 lines
358 B
TypeScript
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; |