mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-23 01:08:28 +02:00
Fix copy response body reference
Closes https://feedback.yaak.app/p/copy-body-only-works-on-first-click
This commit is contained in:
@@ -6,7 +6,7 @@ import { getResponseBodyText } from '../lib/responseBody';
|
|||||||
export function useCopyHttpResponse(response: HttpResponse) {
|
export function useCopyHttpResponse(response: HttpResponse) {
|
||||||
const copy = useCopy();
|
const copy = useCopy();
|
||||||
return useFastMutation({
|
return useFastMutation({
|
||||||
mutationKey: ['copy_http_response'],
|
mutationKey: ['copy_http_response', response.id],
|
||||||
async mutationFn() {
|
async mutationFn() {
|
||||||
const body = await getResponseBodyText(response);
|
const body = await getResponseBodyText(response);
|
||||||
copy(body);
|
copy(body);
|
||||||
|
|||||||
Reference in New Issue
Block a user