massive refactor toDrop cascadeStudio and add CadQuery + OpenSCAD
resolves #400
This commit is contained in:
21
app/web/src/helpers/hooks/useUpdateProject.ts
Normal file
21
app/web/src/helpers/hooks/useUpdateProject.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { useMutation } from '@redwoodjs/web'
|
||||
|
||||
const UPDATE_PROJECT_MUTATION_HOOK = gql`
|
||||
mutation UpdateProjectMutationHook(
|
||||
$id: String!
|
||||
$input: UpdateProjectInput!
|
||||
) {
|
||||
updateProject: updateProject(id: $id, input: $input) {
|
||||
id
|
||||
}
|
||||
}
|
||||
`
|
||||
|
||||
export const useUpdateProject = ({ onCompleted }) => {
|
||||
const [updateProject, { loading, error }] = useMutation(
|
||||
UPDATE_PROJECT_MUTATION_HOOK,
|
||||
{ onCompleted }
|
||||
)
|
||||
|
||||
return { updateProject, loading, error }
|
||||
}
|
||||
Reference in New Issue
Block a user