mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-22 17:39:12 +01:00
Context menu, logs in DevTools, export, tweaks
This commit is contained in:
15
src-web/hooks/useSendFolder.ts
Normal file
15
src-web/hooks/useSendFolder.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { useMutation } from '@tanstack/react-query';
|
||||
import { trackEvent } from '../lib/analytics';
|
||||
import { useSendAnyRequest } from './useSendAnyRequest';
|
||||
|
||||
export function useSendManyRequests() {
|
||||
const sendAnyRequest = useSendAnyRequest();
|
||||
return useMutation<void, string, string[]>({
|
||||
mutationFn: async (requestIds: string[]) => {
|
||||
for (const id of requestIds) {
|
||||
sendAnyRequest.mutate(id);
|
||||
}
|
||||
},
|
||||
onSettled: () => trackEvent('http_request', 'send'),
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user