Switch to useMutation in some places

This commit is contained in:
Gregory Schier
2024-12-20 17:38:41 -08:00
parent 27134a52ad
commit 51a11b6495
48 changed files with 98 additions and 99 deletions

View File

@@ -1,11 +1,11 @@
import { useMutation } from './useMutation';
import { useFastMutation } from './useFastMutation';
import type { HttpResponse } from '@yaakapp-internal/models';
import { useCopy } from './useCopy';
import { getResponseBodyText } from '../lib/responseBody';
export function useCopyHttpResponse(response: HttpResponse) {
const copy = useCopy();
return useMutation({
return useFastMutation({
mutationKey: ['copy_http_response'],
async mutationFn() {
const body = await getResponseBodyText(response);