Fix copy response body reference

Closes https://feedback.yaak.app/p/copy-body-only-works-on-first-click
This commit is contained in:
Gregory Schier
2025-05-08 08:02:27 -07:00
parent 18664975a9
commit 8b1ca4cb47

View File

@@ -6,7 +6,7 @@ import { getResponseBodyText } from '../lib/responseBody';
export function useCopyHttpResponse(response: HttpResponse) {
const copy = useCopy();
return useFastMutation({
mutationKey: ['copy_http_response'],
mutationKey: ['copy_http_response', response.id],
async mutationFn() {
const body = await getResponseBodyText(response);
copy(body);