diff --git a/src/components/AuthMenu.js b/src/components/AuthMenu.js index 89ff872..fe3357e 100644 --- a/src/components/AuthMenu.js +++ b/src/components/AuthMenu.js @@ -6,11 +6,12 @@ class AuthMenu extends Component { super(props) this.state = { where_in_auth_menu: "username", - auth_menu_visible: true, + auth_menu_visible: props.auth_menu_visible, } this.handleSignUpRequest = this.handleSignUpRequest.bind(this) this.handleLogInAttempt = this.handleLogInAttempt.bind(this) this.handleAccountCreation = this.handleAccountCreation.bind(this) + this.authMenu = this.authMenu.bind(this) } handleSignUpRequest() { @@ -33,41 +34,44 @@ class AuthMenu extends Component { })); } + authMenu() { + if (!this.state.auth_menu_visible) { + return null; + } + switch(this.state.where_in_auth_menu) { + case 'username': + return ( +