diff --git a/src/app/molecules/sidebar-avatar/SidebarAvatar.jsx b/src/app/molecules/sidebar-avatar/SidebarAvatar.jsx index e67b69f..39238a5 100644 --- a/src/app/molecules/sidebar-avatar/SidebarAvatar.jsx +++ b/src/app/molecules/sidebar-avatar/SidebarAvatar.jsx @@ -12,7 +12,8 @@ import { blurOnBubbling } from '../../atoms/button/script'; const SidebarAvatar = React.forwardRef(({ tooltip, text, bgColor, imageSrc, - iconSrc, active, onClick, isUnread, notificationCount, isAlert, + iconSrc, active, onClick, onContextMenu, + isUnread, notificationCount, isAlert, }, ref) => { let activeClass = ''; if (active) activeClass = ' sidebar-avatar--active'; @@ -27,6 +28,7 @@ const SidebarAvatar = React.forwardRef(({ type="button" onMouseUp={(e) => blurOnBubbling(e, '.sidebar-avatar')} onClick={onClick} + onContextMenu={onContextMenu} > { + e.preventDefault(); + openReusableContextMenu( + 'right', + getEventCords(e, '.sidebar-avatar'), + (closeMenu) => , + ); + }; + function getHomeNoti() { const orphans = roomList.getOrphans(); let noti = null; @@ -174,6 +185,7 @@ function SideBar() { notificationCount={abbreviateNumber(notifications.getTotalNoti(sRoomId))} isAlert={notifications.getHighlightNoti(sRoomId) !== 0} onClick={() => selectTab(shortcut)} + onContextMenu={(e) => openSpaceOptions(e, sRoomId)} /> ); })