mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-27 11:51:13 +01:00
Switch to useMutation in some places
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user