@@ -55,7 +55,6 @@ export default function Menu() {
5555 }
5656
5757 const userFullName = user ?. fullName || user ?. name || '...' ;
58- const showTeamsUI = user ?. rolesOrPermissions ?. includes ( 'teams-and-projects' ) ;
5958 const team = getCurrentTeam ( location , teams ) ;
6059
6160 {
@@ -71,7 +70,7 @@ export default function Menu() {
7170
7271 const [ teamMembers , setTeamMembers ] = useState < Record < string , TeamMemberInfo [ ] > > ( { } ) ;
7372 useEffect ( ( ) => {
74- if ( ! showTeamsUI || ! teams ) {
73+ if ( ! teams ) {
7574 return ;
7675 }
7776 ( async ( ) => {
@@ -127,10 +126,10 @@ export default function Menu() {
127126 }
128127 // User menu
129128 return [
130- ... ( showTeamsUI ? [ {
129+ {
131130 title : 'Projects' ,
132131 link : '/projects'
133- } ] : [ ] ) ,
132+ } ,
134133 {
135134 title : 'Workspaces' ,
136135 link : '/workspaces' ,
@@ -239,17 +238,7 @@ export default function Menu() {
239238 < img src = { gitpodIcon } className = "h-6" />
240239 </ Link >
241240 { ! isMinimalUI && < div className = "ml-2 text-base" >
242- { showTeamsUI
243- ? renderTeamMenu ( )
244- : < nav className = "flex-1" >
245- < ul className = "flex flex-1 items-center justify-between text-base text-gray-700 space-x-2" >
246- < li className = "flex-1" > </ li >
247- { leftMenu . map ( entry => < li key = { entry . title } >
248- < PillMenuItem name = { entry . title } selected = { isSelected ( entry , location ) } link = { entry . link } />
249- </ li > ) }
250- </ ul >
251- </ nav >
252- }
241+ { renderTeamMenu ( ) }
253242 </ div > }
254243 </ div >
255244 < div className = "flex flex-1 items-center w-auto" id = "menu" >
@@ -283,10 +272,10 @@ export default function Menu() {
283272 </ div >
284273 </ div >
285274 </ div >
286- { ! isMinimalUI && showTeamsUI && ! prebuildId && < div className = "flex" >
275+ { ! isMinimalUI && ! prebuildId && < div className = "flex" >
287276 { leftMenu . map ( ( entry : Entry ) => < TabMenuItem key = { entry . title } name = { entry . title } selected = { isSelected ( entry , location ) } link = { entry . link } /> ) }
288277 </ div > }
289278 </ header >
290- { showTeamsUI && < Separator /> }
279+ < Separator />
291280 </ > ;
292281}
0 commit comments