mirror of
https://github.com/usebruno/bruno.git
synced 2026-07-09 06:55:03 +00:00
refactor: centralize tab management (#6494)
* refactor: centralize tab management by removing redundant hide calls in Collection components - Removed dispatch calls for hiding home and API spec pages from Collection and CollectionItem components. - Added logic in app slice to automatically hide these pages when a tab is added or focused, improving code maintainability. * refactor: remove redundant hideHomePage dispatches from components
This commit is contained in:
@@ -10,7 +10,6 @@ import {
|
||||
} from '@tabler/icons';
|
||||
import { flattenItems, isItemARequest, isItemAFolder, findParentItemInCollection } from 'utils/collections';
|
||||
import { addTab, focusTab } from 'providers/ReduxStore/slices/tabs';
|
||||
import { hideHomePage } from 'providers/ReduxStore/slices/app';
|
||||
import { toggleCollectionItem, toggleCollection } from 'providers/ReduxStore/slices/collections';
|
||||
import { mountCollection } from 'providers/ReduxStore/slices/collections/actions';
|
||||
import { getDefaultRequestPaneTab } from 'utils/collections';
|
||||
@@ -246,8 +245,6 @@ const GlobalSearchModal = ({ isOpen, onClose }) => {
|
||||
expandItemPath(result);
|
||||
|
||||
if (result.type === SEARCH_TYPES.REQUEST) {
|
||||
dispatch(hideHomePage());
|
||||
|
||||
const existingTab = tabs.find((tab) => tab.uid === result.item.uid);
|
||||
|
||||
if (existingTab) {
|
||||
|
||||
Reference in New Issue
Block a user