@@ -39,7 +39,7 @@ import { useIsEncrypted } from "../../../hooks/useIsEncrypted";
39
39
import BaseCard , { Group } from "./BaseCard" ;
40
40
import { _t } from "../../../languageHandler" ;
41
41
import RoomAvatar from "../avatars/RoomAvatar" ;
42
- import AccessibleButton , { ButtonEvent } from "../elements/AccessibleButton" ;
42
+ import AccessibleButton from "../elements/AccessibleButton" ;
43
43
import defaultDispatcher from "../../../dispatcher/dispatcher" ;
44
44
import { RightPanelPhases } from "../../../stores/right-panel/RightPanelStorePhases" ;
45
45
import Modal from "../../../Modal" ;
@@ -268,7 +268,7 @@ const onRoomPinsClick = (): void => {
268
268
RightPanelStore . instance . pushCard ( { phase : RightPanelPhases . PinnedMessages } , true ) ;
269
269
} ;
270
270
271
- const onRoomSettingsClick = ( ev : ButtonEvent ) : void => {
271
+ const onRoomSettingsClick = ( ev : Event ) : void => {
272
272
defaultDispatcher . dispatch ( { action : "open_room_settings" } ) ;
273
273
PosthogTrackers . trackInteraction ( "WebRightPanelRoomInfoSettingsButton" , ev ) ;
274
274
} ;
@@ -303,7 +303,7 @@ const RoomSummaryCard: React.FC<IProps> = ({ room, permalinkCreator, onClose, on
303
303
} ) ;
304
304
} ;
305
305
306
- const onRoomMembersClick = ( ev : ButtonEvent ) : void => {
306
+ const onRoomMembersClick = ( ev : Event ) : void => {
307
307
RightPanelStore . instance . pushCard ( { phase : RightPanelPhases . RoomMemberList } , true ) ;
308
308
PosthogTrackers . trackInteraction ( "WebRightPanelRoomInfoPeopleButton" , ev ) ;
309
309
} ;
@@ -433,50 +433,52 @@ const RoomSummaryCard: React.FC<IProps> = ({ room, permalinkCreator, onClose, on
433
433
label = { _t ( "room|context_menu|favourite" ) }
434
434
checked = { isFavorite }
435
435
onChange = { ( ) => tagRoom ( room , DefaultTagID . Favourite ) }
436
+ // XXX: https://github.com/element-hq/compound/issues/288
437
+ onSelect = { ( ) => { } }
436
438
/>
437
439
< MenuItem
438
440
Icon = { UserAddIcon }
439
441
label = { _t ( "action|invite" ) }
440
442
disabled = { ! canInviteTo ( room ) }
441
- onClick = { ( ) => inviteToRoom ( room ) }
443
+ onSelect = { ( ) => inviteToRoom ( room ) }
442
444
/>
443
- < MenuItem Icon = { LinkIcon } label = { _t ( "action|copy_link" ) } onClick = { onShareRoomClick } />
444
- < MenuItem Icon = { SettingsIcon } label = { _t ( "common|settings" ) } onClick = { onRoomSettingsClick } />
445
+ < MenuItem Icon = { LinkIcon } label = { _t ( "action|copy_link" ) } onSelect = { onShareRoomClick } />
446
+ < MenuItem Icon = { SettingsIcon } label = { _t ( "common|settings" ) } onSelect = { onRoomSettingsClick } />
445
447
446
448
< Separator />
447
449
< MenuItem
448
450
// this icon matches the legacy implementation
449
451
// and is a short term solution until legacy room header is removed
450
452
Icon = { UserProfileSolidIcon }
451
453
label = { _t ( "common|people" ) }
452
- onClick = { onRoomMembersClick }
454
+ onSelect = { onRoomMembersClick }
453
455
/>
454
456
{ ! isVideoRoom && (
455
457
< >
456
- < MenuItem Icon = { FilesIcon } label = { _t ( "right_panel|files_button" ) } onClick = { onRoomFilesClick } />
458
+ < MenuItem Icon = { FilesIcon } label = { _t ( "right_panel|files_button" ) } onSelect = { onRoomFilesClick } />
457
459
< MenuItem
458
460
Icon = { PollsIcon }
459
461
label = { _t ( "right_panel|polls_button" ) }
460
- onClick = { onRoomPollHistoryClick }
462
+ onSelect = { onRoomPollHistoryClick }
461
463
/>
462
464
{ pinningEnabled && (
463
465
< MenuItem
464
466
Icon = { PinIcon }
465
467
label = { _t ( "right_panel|pinned_messages_button" ) }
466
- onClick = { onRoomPinsClick }
468
+ onSelect = { onRoomPinsClick }
467
469
>
468
470
< Text as = "span" size = "sm" >
469
471
{ pinCount }
470
472
</ Text >
471
473
</ MenuItem >
472
474
) }
473
- < MenuItem Icon = { ExportArchiveIcon } label = { _t ( "export_chat|title" ) } onClick = { onRoomExportClick } />
475
+ < MenuItem Icon = { ExportArchiveIcon } label = { _t ( "export_chat|title" ) } onSelect = { onRoomExportClick } />
474
476
</ >
475
477
) }
476
478
477
479
< Separator />
478
480
479
- < MenuItem Icon = { LeaveIcon } kind = "critical" label = { _t ( "action|leave_room" ) } onClick = { onLeaveRoomClick } />
481
+ < MenuItem Icon = { LeaveIcon } kind = "critical" label = { _t ( "action|leave_room" ) } onSelect = { onLeaveRoomClick } />
480
482
481
483
{ SettingsStore . getValue ( UIFeature . Widgets ) &&
482
484
! isVideoRoom &&
0 commit comments