Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pooja-bruno committed Jan 22, 2025
1 parent db822c6 commit 94e1504
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/bruno-app/src/components/RequestTabPanel/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ const RequestTabPanel = () => {
const dispatch = useDispatch();
const tabs = useSelector((state) => state.tabs.tabs);
const activeTabUid = useSelector((state) => state.tabs.activeTabUid);
const showResponsePane = useSelector((state) => state.tabs.showResponsePane);
const focusedTab = find(tabs, (t) => t.uid === activeTabUid);
const { globalEnvironments, activeGlobalEnvironmentUid } = useSelector((state) => state.globalEnvironments);
const _collections = useSelector((state) => state.collections.collections);
const [showResponsePane, setShowResponsePane] = useState(false);

// merge `globalEnvironmentVariables` into the active collection and rebuild `collections` immer proxy object
let collections = produce(_collections, (draft) => {
Expand All @@ -58,15 +58,15 @@ const RequestTabPanel = () => {

let collection = find(collections, (c) => c.uid === focusedTab?.collectionUid);

const toggleResponsePane = () => {
const handleToggleResponsePane = () => {
const responsePane = document.querySelector('.response-pane');
if (showResponsePane) {
responsePane?.classList.add('response-pane-exit');
setTimeout(() => {
setShowResponsePane(false);
dispatch(toggleResponsePane());
}, 280);
} else {
setShowResponsePane(true);
dispatch(toggleResponsePane());
}
};

Expand Down Expand Up @@ -230,7 +230,7 @@ const RequestTabPanel = () => {

<div
className="response-toggle"
onClick={toggleResponsePane}
onClick={handleToggleResponsePane}
title={showResponsePane ? 'Collapse response' : 'Show response'}
>
{showResponsePane ? (
Expand Down

0 comments on commit 94e1504

Please sign in to comment.