mirror of
https://github.com/usebruno/bruno.git
synced 2026-07-08 22:45:25 +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:
@@ -3,7 +3,6 @@ import { useSelector, useDispatch } from 'react-redux';
|
||||
import { IconBox, IconTrash, IconEdit, IconShare, IconDots } from '@tabler/icons';
|
||||
import { removeCollectionFromWorkspaceAction } from 'providers/ReduxStore/slices/workspaces/actions';
|
||||
import { addTab } from 'providers/ReduxStore/slices/tabs';
|
||||
import { hideHomePage } from 'providers/ReduxStore/slices/app';
|
||||
import { mountCollection } from 'providers/ReduxStore/slices/collections/actions';
|
||||
import { normalizePath } from 'utils/common/path';
|
||||
import toast from 'react-hot-toast';
|
||||
@@ -117,8 +116,6 @@ const CollectionsList = ({ workspace }) => {
|
||||
})
|
||||
);
|
||||
|
||||
dispatch(hideHomePage());
|
||||
|
||||
dispatch(
|
||||
addTab({
|
||||
uid: collection.uid,
|
||||
|
||||
Reference in New Issue
Block a user