Skip to content

Commit

Permalink
only support on success callback
Browse files Browse the repository at this point in the history
  • Loading branch information
jkdowdle committed Dec 1, 2023
1 parent 394b576 commit 76a5eb4
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions src/hooks/useConsent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { useActiveProject } from './useActiveProject';
import { Consent, Questionnaire } from 'fhir/r3';
import { useRestQuery, useRestMutation } from './rest-api';
import { RestAPIEndpoints } from '../types/rest-types';
import { UseMutationOptions } from '@tanstack/react-query';

type PatchConsentDirectives =
RestAPIEndpoints['PATCH /v1/consent/directives/me/:directiveId'];
Expand All @@ -17,15 +16,14 @@ export const useConsent = () => {
});
};

const useUpdateProjectConsentDirective = (
options: UseMutationOptions<
PatchConsentDirectives['Response'],
unknown,
PatchConsentDirectives['Request'] & {
const useUpdateProjectConsentDirective = (options?: {
onSuccess?: (
data: PatchConsentDirectives['Response'],
variables: PatchConsentDirectives['Request'] & {
directiveId: string;
}
> = {},
) => {
},
) => Promise<void> | void;
}) => {
const mutation = useRestMutation(
'PATCH /v1/consent/directives/me/:directiveId',
options,
Expand Down

0 comments on commit 76a5eb4

Please sign in to comment.