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 @@ -22,7 +22,6 @@ useServerCall, useDispatchActionPromise, } from 'lib/utils/action-utils'; -import { isDev } from 'lib/utils/dev-utils'; import MenuItem from '../components/menu-item.react'; import Menu from '../components/menu.react'; @@ -44,7 +43,7 @@ function ThreadMenu(props: ThreadMenuProps): React.Node { const { pushModal, popModal } = useModalContext(); const { threadInfo } = props; - const { onPromoteSidebar } = usePromoteSidebar(threadInfo); + const { onPromoteSidebar, canPromoteSidebar } = usePromoteSidebar(threadInfo); const onClickSettings = React.useCallback( () => pushModal(), @@ -230,7 +229,6 @@ // TODO: Enable menu items when the modals are implemented const SHOW_NOTIFICATIONS = false; const SHOW_CREATE_SUBCHANNELS = false; - const SHOW_PROMOTE_SIDEBAR = isDev; const items = [ settingsItem, @@ -240,7 +238,7 @@ viewSubchannelsItem, SHOW_CREATE_SUBCHANNELS && createSubchannelsItem, leaveThreadItem && separator, - SHOW_PROMOTE_SIDEBAR && promoteSidebar, + canPromoteSidebar && promoteSidebar, leaveThreadItem, ]; return items.filter(Boolean); @@ -252,6 +250,7 @@ promoteSidebar, createSubchannelsItem, leaveThreadItem, + canPromoteSidebar, ]); const icon = React.useMemo( () => ,