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 { constructor(props: Props) { @@ -126,39 +127,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 = ( @@ -235,7 +203,7 @@
    {tabs}
- {mainContent} + {this.props.mainContent}
{buttons}
@@ -464,6 +432,50 @@ ); } + const inputDisabled = + changeInProgress || !hasPermissionForTab(threadInfo, currentTabType); + + let mainContent; + if (currentTabType === 'general') { + mainContent = ( + + ); + } else if (currentTabType === 'privacy') { + mainContent = ( + + ); + } else if (currentTabType === 'delete') { + mainContent = ( + + ); + } + return ( ); },