diff --git a/web/modals/chat/sidebar-promote-modal.react.js b/web/modals/chat/sidebar-promote-modal.react.js index ee2614a2c..c88a883d4 100644 --- a/web/modals/chat/sidebar-promote-modal.react.js +++ b/web/modals/chat/sidebar-promote-modal.react.js @@ -1,51 +1,52 @@ // @flow import * as React from 'react'; import type { ThreadInfo } from 'lib/types/thread-types'; +import { useResolvedThreadInfo } from 'lib/utils/entity-helpers'; import Button from '../../components/button.react'; import Modal from '../modal.react'; import css from './sidebar-promote-modal.css'; type Props = { +onClose: () => void, +onConfirm: () => void, +threadInfo: ThreadInfo, }; function SidebarPromoteModal(props: Props): React.Node { const { threadInfo, onClose, onConfirm } = props; - const { uiName } = threadInfo; + const { uiName } = useResolvedThreadInfo(threadInfo); const handleConfirm = React.useCallback(() => { onConfirm(); onClose(); }, [onClose, onConfirm]); return (

{`Are you sure you want to promote "${uiName}"? Promoting a thread to a channel cannot be undone.`}

); } export default SidebarPromoteModal;