mirror of
https://github.com/IRBorisov/ConceptPortal.git
synced 2025-06-26 04:50:36 +03:00
16 lines
484 B
TypeScript
16 lines
484 B
TypeScript
import { useMutation } from '@tanstack/react-query';
|
|
|
|
import { ICheckConstituentaDTO, rsformsApi } from './api';
|
|
|
|
export const useCheckConstituenta = () => {
|
|
const mutation = useMutation({
|
|
mutationKey: ['actions', 'check-constituenta'],
|
|
mutationFn: rsformsApi.checkConstituenta
|
|
});
|
|
return {
|
|
checkConstituenta: (data: { itemID: number; data: ICheckConstituentaDTO }) => mutation.mutateAsync(data),
|
|
isPending: mutation.isPending,
|
|
error: mutation.error
|
|
};
|
|
};
|