use{Service}{Action}.mutation.ts
import { MutationOptions, useMutation } from '@tanstack/react-query';
import { PayloadType } from '@/types/api';| import { DependencyList, useEffect } from 'react'; | |
| export function useDebouncedEffect( | |
| fn: () => void, | |
| deps: DependencyList, | |
| delay: number | |
| ) { | |
| useEffect(() => { | |
| const timer = setTimeout(() => { | |
| fn(); |