diff --git a/web/chat/thread-menu.react.js b/web/chat/thread-menu.react.js
--- a/web/chat/thread-menu.react.js
+++ b/web/chat/thread-menu.react.js
@@ -23,6 +23,7 @@
threadPermissions,
} from 'lib/types/thread-types';
+import SidebarListModal from '../modals/chat/sidebar-list-modal.react';
import { useModalContext } from '../modals/modal-provider.react';
import ThreadSettingsModal from '../modals/threads/thread-settings-modal.react';
import { useSelector } from '../redux/redux-utils';
@@ -74,14 +75,24 @@
);
}, [childThreads]);
+ const onClickSidebars = React.useCallback(
+ () => setModal(),
+ [setModal, threadInfo],
+ );
+
const sidebarItem = React.useMemo(() => {
if (!hasSidebars) {
return null;
}
return (
-
+
);
- }, [hasSidebars]);
+ }, [hasSidebars, onClickSidebars]);
const canCreateSubchannels = React.useMemo(
() => threadHasPermission(threadInfo, threadPermissions.CREATE_SUBCHANNELS),
@@ -145,7 +156,6 @@
// TODO: Enable menu items when the modals are implemented
const SHOW_NOTIFICATIONS = false;
const SHOW_MEMBERS = false;
- const SHOW_SIDEBAR = false;
const SHOW_VIEW_SUBCHANNELS = false;
const SHOW_CREATE_SUBCHANNELS = false;
const SHOW_LEAVE_THREAD = false;
@@ -154,7 +164,7 @@
settingsItem,
SHOW_NOTIFICATIONS && notificationsItem,
SHOW_MEMBERS && membersItem,
- SHOW_SIDEBAR && sidebarItem,
+ sidebarItem,
SHOW_VIEW_SUBCHANNELS && viewSubchannelsItem,
SHOW_CREATE_SUBCHANNELS && createSubchannelsItem,
SHOW_LEAVE_THREAD && leaveThreadItem && separator,