@@ -45,7 +45,13 @@ import {
4545 showCreateNewSubspace ,
4646 showSpaceInvite ,
4747} from "../../../utils/space" ;
48- import { ChevronFace , ContextMenuTooltipButton , useContextMenu , MenuProps } from "../../structures/ContextMenu" ;
48+ import {
49+ ChevronFace ,
50+ ContextMenuTooltipButton ,
51+ useContextMenu ,
52+ MenuProps ,
53+ ContextMenuButton ,
54+ } from "../../structures/ContextMenu" ;
4955import { BetaPill } from "../beta/BetaCard" ;
5056import IconizedContextMenu , {
5157 IconizedContextMenuOption ,
@@ -390,21 +396,24 @@ const RoomListHeader: React.FC<IProps> = ({ onVisibilityChange }) => {
390396
391397 let contextMenuButton : JSX . Element = < div className = "mx_RoomListHeader_contextLessTitle" > { title } </ div > ;
392398 if ( canShowMainMenu ) {
393- contextMenuButton = (
394- < ContextMenuTooltipButton
395- inputRef = { mainMenuHandle }
396- onClick = { openMainMenu }
397- isExpanded = { mainMenuDisplayed }
398- className = "mx_RoomListHeader_contextMenuButton"
399- title = {
400- activeSpace
401- ? _t ( "%(spaceName)s menu" , { spaceName : spaceName ?? activeSpace . name } )
402- : _t ( "Home options" )
403- }
404- >
405- { title }
406- </ ContextMenuTooltipButton >
407- ) ;
399+ const commonProps = {
400+ inputRef : mainMenuHandle ,
401+ onClick : openMainMenu ,
402+ isExpanded : mainMenuDisplayed ,
403+ className : "mx_RoomListHeader_contextMenuButton" ,
404+ children : title ,
405+ } ;
406+
407+ if ( ! ! activeSpace ) {
408+ contextMenuButton = (
409+ < ContextMenuButton
410+ { ...commonProps }
411+ label = { _t ( "%(spaceName)s menu" , { spaceName : spaceName ?? activeSpace . name } ) }
412+ />
413+ ) ;
414+ } else {
415+ contextMenuButton = < ContextMenuTooltipButton { ...commonProps } title = { _t ( "Home options" ) } /> ;
416+ }
408417 }
409418
410419 return (
0 commit comments