From 1a52cd52811193c1762f96e2a33cec64dc87f905 Mon Sep 17 00:00:00 2001 From: Charles Francoise Date: Tue, 1 Mar 2022 21:45:01 +0100 Subject: [PATCH] fix: hide "intercept response" checkbox in response view (#113) --- src/panel/RequestBody.tsx | 2 +- src/panel/RequestView.tsx | 22 ++++++++++--------- .../__tests__/__snapshots__/Main.tsx.snap | 4 ++-- .../__snapshots__/RequestBody.tsx.snap | 2 +- .../__snapshots__/RequestView.tsx.snap | 12 +++++----- 5 files changed, 22 insertions(+), 20 deletions(-) diff --git a/src/panel/RequestBody.tsx b/src/panel/RequestBody.tsx index 537bebb0..151baea3 100644 --- a/src/panel/RequestBody.tsx +++ b/src/panel/RequestBody.tsx @@ -65,7 +65,7 @@ const RequestBody = ({ requestId, className = '' }: Props) => { }, [contentType, onChangeBody, request.id, request.postData]) return ( -
+
{bodyView}
) diff --git a/src/panel/RequestView.tsx b/src/panel/RequestView.tsx index 094512eb..2766f7ec 100644 --- a/src/panel/RequestView.tsx +++ b/src/panel/RequestView.tsx @@ -29,11 +29,11 @@ const RequestView = ({ requestId }: Props) => { () => ( <> @@ -73,14 +73,16 @@ const RequestView = ({ requestId }: Props) => { return (
{buttons}
- + {request.stage !== 'Response' ? ( + + ) : null} {content}
) diff --git a/src/panel/__tests__/__snapshots__/Main.tsx.snap b/src/panel/__tests__/__snapshots__/Main.tsx.snap index dc494eff..20609632 100644 --- a/src/panel/__tests__/__snapshots__/Main.tsx.snap +++ b/src/panel/__tests__/__snapshots__/Main.tsx.snap @@ -149,7 +149,7 @@ exports[`[Main] should match request selection snapshot 1`] = `