@@ -19,33 +19,25 @@ export const SharedButton = ({ children, className, onClick }) => {
1919 ) ;
2020} ;
2121
22- const DefaultTab = ( { setTab, isReadOnly } ) => {
22+ const DefaultTab = ( { setTab } ) => {
2323 return (
2424 < div className = "text-center items-center flex flex-col" >
2525 < IconFileAlert size = { 64 } strokeWidth = { 1 } />
2626 < span className = "font-semibold mt-2" > No environments found</ span >
27- { isReadOnly ? (
28- < span className = "font-extralight mt-2 text-zinc-500 dark:text-zinc-400" >
29- This collection is read-only. Environments cannot be created or modified.
30- </ span >
31- ) : (
32- < >
33- < span className = "font-extralight mt-2 text-zinc-500 dark:text-zinc-400" >
34- Get started by using the following buttons :
35- </ span >
36- < div className = "flex items-center justify-center mt-6" >
37- < SharedButton onClick = { ( ) => setTab ( 'create' ) } >
38- < span > Create Environment</ span >
39- </ SharedButton >
27+ < span className = "font-extralight mt-2 text-zinc-500 dark:text-zinc-400" >
28+ Get started by using the following buttons :
29+ </ span >
30+ < div className = "flex items-center justify-center mt-6" >
31+ < SharedButton onClick = { ( ) => setTab ( 'create' ) } >
32+ < span > Create Environment</ span >
33+ </ SharedButton >
4034
41- < span className = "mx-4" > Or</ span >
35+ < span className = "mx-4" > Or</ span >
4236
43- < SharedButton onClick = { ( ) => setTab ( 'import' ) } >
44- < span > Import Environment</ span >
45- </ SharedButton >
46- </ div >
47- </ >
48- ) }
37+ < SharedButton onClick = { ( ) => setTab ( 'import' ) } >
38+ < span > Import Environment</ span >
39+ </ SharedButton >
40+ </ div >
4941 </ div >
5042 ) ;
5143} ;
@@ -55,18 +47,16 @@ const EnvironmentSettings = ({ collection, onClose }) => {
5547 const { environments } = collection ;
5648 const [ selectedEnvironment , setSelectedEnvironment ] = useState ( null ) ;
5749 const [ tab , setTab ] = useState ( 'default' ) ;
58- const isReadOnly = collection . brunoConfig ?. readOnly || collection . readOnly ;
59-
6050 if ( ! environments || ! environments . length ) {
6151 return (
6252 < StyledWrapper >
6353 < Modal size = "md" title = "Environments" handleCancel = { onClose } hideCancel = { true } hideFooter = { true } >
64- { tab === 'create' && ! isReadOnly ? (
54+ { tab === 'create' ? (
6555 < CreateEnvironment collection = { collection } onClose = { ( ) => setTab ( 'default' ) } />
66- ) : tab === 'import' && ! isReadOnly ? (
56+ ) : tab === 'import' ? (
6757 < ImportEnvironment collection = { collection } onClose = { ( ) => setTab ( 'default' ) } />
6858 ) : (
69- < DefaultTab setTab = { setTab } isReadOnly = { isReadOnly } />
59+ < DefaultTab setTab = { setTab } />
7060 ) }
7161 </ Modal >
7262 </ StyledWrapper >
0 commit comments