diff --git a/ts/components/session/SessionInput.tsx b/ts/components/session/SessionInput.tsx index 2d954e6ee..8bb1be1e0 100644 --- a/ts/components/session/SessionInput.tsx +++ b/ts/components/session/SessionInput.tsx @@ -22,9 +22,7 @@ export class SessionInput extends React.PureComponent { super(props); this.updateInputValue = this.updateInputValue.bind(this); - this.renderEnableShowHideButton = this.renderEnableShowHideButton.bind( - this - ); + this.renderShowHideButton = this.renderShowHideButton.bind(this); this.state = { inputValue: '', @@ -63,30 +61,26 @@ export class SessionInput extends React.PureComponent { )} /> - {this.renderEnableShowHideButton(enableShowHide)} + {enableShowHide && this.renderShowHideButton()}
); } - private renderEnableShowHideButton(enableShowHide: boolean | undefined) { - if (enableShowHide) { - return ( - { - this.setState({ - forceShow: !this.state.forceShow, - }); - }} - /> - ); - } - - return undefined; + private renderShowHideButton() { + return ( + { + this.setState({ + forceShow: !this.state.forceShow, + }); + }} + /> + ); } private updateInputValue(e: any) { diff --git a/ts/components/session/SessionRegistrationView.tsx b/ts/components/session/SessionRegistrationView.tsx index 802dcf3e7..27abde408 100644 --- a/ts/components/session/SessionRegistrationView.tsx +++ b/ts/components/session/SessionRegistrationView.tsx @@ -19,7 +19,7 @@ export class SessionRegistrationView extends React.Component {
- +