Compare commits
2 commits
6e57686f8f
...
2fcbe3b2da
Author | SHA1 | Date | |
---|---|---|---|
2fcbe3b2da | |||
776a567c0c |
1 changed files with 7 additions and 6 deletions
|
@ -1,17 +1,18 @@
|
|||
import React, { Component } from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
class AuthMenu extends Component {
|
||||
constructor (props) {
|
||||
super(props)
|
||||
|
||||
this.state = {
|
||||
where_in_auth_menu: "username",
|
||||
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() {
|
||||
|
@ -35,7 +36,7 @@ class AuthMenu extends Component {
|
|||
}
|
||||
|
||||
authMenu() {
|
||||
if (!this.state.auth_menu_visible) {
|
||||
if (!this.props.auth_menu_visible) {
|
||||
return null;
|
||||
}
|
||||
switch(this.state.where_in_auth_menu) {
|
||||
|
@ -50,7 +51,7 @@ class AuthMenu extends Component {
|
|||
<div className="fluid ui buttons">
|
||||
<button onClick={this.handleSignUpRequest} className="ui button">Sign Up</button>
|
||||
<div className="or"></div>
|
||||
<button className="ui positive button">Sign In</button>
|
||||
<button onClick={this.handleLogInAttempt} className="ui positive button">Sign In</button>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
@ -58,9 +59,9 @@ class AuthMenu extends Component {
|
|||
return (
|
||||
<div className="ui menu dropdown" style={{display: "inline"}}>
|
||||
<div className="ui left icon input">
|
||||
<input type="text" placeholder="Username">
|
||||
<input type="text" placeholder="Password">
|
||||
</input>
|
||||
<i className="users icon"></i>
|
||||
<i className="lock icon"></i>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
|
Reference in a new issue