mirror of
https://github.com/IRBorisov/ConceptPortal.git
synced 2025-06-26 04:50:36 +03:00
14 lines
362 B
TypeScript
14 lines
362 B
TypeScript
import { useMutation } from '@tanstack/react-query';
|
|
|
|
import { ossApi } from './api';
|
|
|
|
export const useFindPredecessor = () => {
|
|
const mutation = useMutation({
|
|
mutationKey: [ossApi.baseKey, 'find-predecessor'],
|
|
mutationFn: ossApi.getPredecessor
|
|
});
|
|
return {
|
|
findPredecessor: (target: number) => mutation.mutateAsync({ target: target })
|
|
};
|
|
};
|