diff --git a/packages/bruno-app/src/components/Environments/EnvironmentSelector/index.js b/packages/bruno-app/src/components/Environments/EnvironmentSelector/index.js
index 8bfbb075eb..eb0fedc250 100644
--- a/packages/bruno-app/src/components/Environments/EnvironmentSelector/index.js
+++ b/packages/bruno-app/src/components/Environments/EnvironmentSelector/index.js
@@ -1,18 +1,17 @@
-import React, { useRef, forwardRef, useState } from 'react';
+import React, { useRef, forwardRef } from 'react';
import find from 'lodash/find';
import Dropdown from 'components/Dropdown';
import { selectEnvironment } from 'providers/ReduxStore/slices/collections/actions';
-import { updateEnvironmentSettingsModalVisibility } from 'providers/ReduxStore/slices/app';
import { IconSettings, IconCaretDown, IconDatabase, IconDatabaseOff } from '@tabler/icons';
-import EnvironmentSettings from '../EnvironmentSettings';
import toast from 'react-hot-toast';
import { useDispatch } from 'react-redux';
import StyledWrapper from './StyledWrapper';
+import { addTab } from 'providers/ReduxStore/slices/tabs';
+import { uuid } from 'utils/common';
const EnvironmentSelector = ({ collection }) => {
const dispatch = useDispatch();
const dropdownTippyRef = useRef();
- const [openSettingsModal, setOpenSettingsModal] = useState(false);
const { environments, activeEnvironmentUid } = collection;
const activeEnvironment = activeEnvironmentUid ? find(environments, (e) => e.uid === activeEnvironmentUid) : null;
@@ -25,15 +24,15 @@ const EnvironmentSelector = ({ collection }) => {
);
});
- const handleSettingsIconClick = () => {
- setOpenSettingsModal(true);
- dispatch(updateEnvironmentSettingsModalVisibility(true));
- };
-
- const handleModalClose = () => {
- setOpenSettingsModal(false);
- dispatch(updateEnvironmentSettingsModalVisibility(false));
- };
+ const viewEnvironmentSettings = () => {
+ dispatch(
+ addTab({
+ uid: uuid(),
+ collectionUid: collection.uid,
+ type: 'environment-settings'
+ })
+ )
+ }
const onDropdownCreate = (ref) => (dropdownTippyRef.current = ref);
@@ -78,7 +77,7 @@ const EnvironmentSelector = ({ collection }) => {