diff --git a/src/pages/ReportSettingsPage.js b/src/pages/ReportSettingsPage.js index 27e411d27ea5..a0ddbc6c8e55 100644 --- a/src/pages/ReportSettingsPage.js +++ b/src/pages/ReportSettingsPage.js @@ -150,7 +150,7 @@ class ReportSettingsPage extends Component { } render() { - const shouldShowRename = !ReportUtils.isPolicyExpenseChat(this.props.report); + const shouldShowRoomName = !ReportUtils.isPolicyExpenseChat(this.props.report); const shouldDisableRename = ReportUtils.isDefaultRoom(this.props.report) || ReportUtils.isArchivedRoom(this.props.report); const linkedWorkspace = _.find(this.props.policies, policy => policy.id === this.props.report.policyID); @@ -165,12 +165,7 @@ class ReportSettingsPage extends Component { /> - - - {this.props.translate('common.notifications')} - - - + { @@ -184,48 +179,59 @@ class ReportSettingsPage extends Component { /> - {shouldShowRename && ( + {shouldShowRoomName && ( - - {this.props.translate('newRoomPage.roomName')} - - + - this.clearErrorAndSetValue('newRoomName', newRoomName)} - disabled={shouldDisableRename} - /> + {shouldDisableRename ? ( + + + {this.props.translate('newRoomPage.roomName')} + + + {this.state.newRoomName} + + + ) + : ( + this.clearErrorAndSetValue('newRoomName', newRoomName)} + disabled={shouldDisableRename} + /> + )} -