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 @@ -105,6 +105,7 @@ +onDelete: (event: SyntheticEvent) => void, +changeThreadSettingsAction: () => Promise, +onSubmit: (event: SyntheticEvent) => void, + +mainContent: ?React.Node, }; class ThreadSettingsModal extends React.PureComponent { nameInput: ?HTMLInputElement; @@ -129,39 +130,6 @@ this.props.changeInProgress || !this.props.hasPermissionForTab(threadInfo, this.props.currentTabType); - let mainContent = null; - if (this.props.currentTabType === 'general') { - mainContent = ( - - ); - } else if (this.props.currentTabType === 'privacy') { - mainContent = ( - - ); - } else if (this.props.currentTabType === 'delete') { - mainContent = ( - - ); - } - let buttons = null; if (this.props.currentTabType === 'delete') { buttons = ( @@ -238,7 +206,7 @@
    {tabs}
- {mainContent} + {this.props.mainContent}
{buttons}
@@ -467,6 +435,50 @@ ); } + const inputDisabled = + changeInProgress || !hasPermissionForTab(threadInfo, currentTabType); + + let mainContent; + if (currentTabType === 'general') { + mainContent = ( + + ); + } else if (currentTabType === 'privacy') { + mainContent = ( + + ); + } else if (currentTabType === 'delete') { + mainContent = ( + + ); + } + return ( ); },