Fix @probo/trust lint errors

Signed-off-by: Émile Ré <nemile.re@gmail.com>
This commit is contained in:
Émile Ré
2025-12-04 16:55:09 +04:00
parent 57caa9d28f
commit 6462de597b
11 changed files with 58 additions and 195 deletions

View File

@@ -1,19 +0,0 @@
import { useEffect, useRef } from "react";
/**
* Hook to handle cleanup after a delay
*
* Used for disposing the graphQL query when the component unmounts
*/
export function useCleanup(callback: () => void, delay: number) {
const timer = useRef<ReturnType<typeof setTimeout>>(null);
useEffect(() => {
if (timer.current) {
clearTimeout(timer.current);
}
return () => {
timer.current = setTimeout(callback, delay);
};
}, [callback, delay]);
}

View File

@@ -56,7 +56,7 @@ export function useMutationWithToasts<T extends MutationParameters>(
})
);
},
[mutate]
[mutate, toast, __, baseOptions]
);
return [mutateWithToast, isLoading] as const;