new features

This commit is contained in:
Daniil
2026-02-27 23:34:17 +03:00
parent 42ce5fa0fe
commit 71b974903a
191 changed files with 11300 additions and 373 deletions
@@ -0,0 +1,25 @@
import type { components } from "@shared/api/__generated__/openapi.types"
import api from "@shared/api"
export type ProjectUpdateBody = components["schemas"]["ProjectUpdate"]
export type ProjectRead = components["schemas"]["ProjectRead"]
interface IUseUpdateProjectParams {
onSuccess?: (project: ProjectRead) => void
onError?: (error: unknown) => void
}
export const useUpdateProject = ({
onSuccess,
onError,
}: IUseUpdateProjectParams = {}) => {
return api.useMutation("patch", "/api/projects/{project_id}/", {
onSuccess: (project) => {
onSuccess?.(project)
},
onError: (error) => {
onError?.(error)
},
})
}