diff --git a/web/chat/chat-thread-list-see-more-sidebars.react.js b/web/chat/chat-thread-list-see-more-sidebars.react.js --- a/web/chat/chat-thread-list-see-more-sidebars.react.js +++ b/web/chat/chat-thread-list-see-more-sidebars.react.js @@ -17,10 +17,7 @@ function ChatThreadListSeeMoreSidebars(props: Props): React.Node { const { unread, showingSidebarsInline, setModal, threadInfo } = props; const onClick = React.useCallback( - () => - setModal( - , - ), + () => setModal(), [setModal, threadInfo], ); const buttonText = showingSidebarsInline ? 'See more...' : 'See sidebars...'; diff --git a/web/modals/chat/sidebar-list-modal.react.js b/web/modals/chat/sidebar-list-modal.react.js --- a/web/modals/chat/sidebar-list-modal.react.js +++ b/web/modals/chat/sidebar-list-modal.react.js @@ -3,6 +3,7 @@ import { faTimesCircle } from '@fortawesome/free-solid-svg-icons'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import classNames from 'classnames'; +import invariant from 'invariant'; import * as React from 'react'; import { sidebarInfoSelector } from 'lib/selectors/thread-selectors'; @@ -15,8 +16,13 @@ import { useSelector } from '../../redux/redux-utils'; import globalCSS from '../../style.css'; import { MagnifyingGlass } from '../../vectors.react'; +import { ModalContext } from '../modal-provider.react'; import Modal from '../modal.react'; +type BaseProps = { + +threadInfo: ThreadInfo, +}; + type Props = { +setModal: (modal: ?React.Node) => void, +threadInfo: ThreadInfo, @@ -141,5 +147,16 @@ ); } +function ConnectedSidebarListModal(props: BaseProps): React.Node { + const { threadInfo } = props; + const modalContext = React.useContext(ModalContext); + invariant(modalContext, 'modalContext should be set'); -export default SidebarListModal; + return ( + + ); +} +export default ConnectedSidebarListModal;