diff --git a/web/modals/threads/thread-settings-modal.react.js b/web/modals/threads/thread-settings-modal.react.js --- a/web/modals/threads/thread-settings-modal.react.js +++ b/web/modals/threads/thread-settings-modal.react.js @@ -94,6 +94,7 @@ +setCurrentTabType: SetState, +queuedChanges: ThreadChanges, +setQueuedChanges: SetState, + +namePlaceholder: string, }; class ThreadSettingsModal extends React.PureComponent { nameInput: ?HTMLInputElement; @@ -153,14 +154,6 @@ : this.props.threadInfo[key]; } - namePlaceholder() { - return robotextName( - this.props.threadInfo, - this.props.viewerID, - this.props.userInfos, - ); - } - changeQueued() { return ( Object.keys( @@ -184,7 +177,7 @@ mainContent = ( { + invariant(threadInfo, 'threadInfo should exist in namePlaceholder'); + return robotextName(threadInfo, viewerID, userInfos); + }, [threadInfo, userInfos, viewerID]); + if (!threadInfo) { return ( @@ -485,6 +483,7 @@ setCurrentTabType={setCurrentTabType} queuedChanges={queuedChanges} setQueuedChanges={setQueuedChanges} + namePlaceholder={namePlaceholder} /> ); },