1
0
Fork 0

Compare commits

..

2 commits

Author SHA1 Message Date
2fcbe3b2da working base to merge 2019-08-27 21:17:11 -04:00
776a567c0c interm 2019-08-27 21:01:42 -04:00

View file

@ -1,17 +1,18 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import { connect } from 'react-redux';
class AuthMenu extends Component { class AuthMenu extends Component {
constructor (props) { constructor (props) {
super(props) super(props)
this.state = { this.state = {
where_in_auth_menu: "username", where_in_auth_menu: "username",
auth_menu_visible: props.auth_menu_visible,
} }
this.handleSignUpRequest = this.handleSignUpRequest.bind(this) this.handleSignUpRequest = this.handleSignUpRequest.bind(this)
this.handleLogInAttempt = this.handleLogInAttempt.bind(this) this.handleLogInAttempt = this.handleLogInAttempt.bind(this)
this.handleAccountCreation = this.handleAccountCreation.bind(this) this.handleAccountCreation = this.handleAccountCreation.bind(this)
this.authMenu = this.authMenu.bind(this) this.authMenu = this.authMenu.bind(this)
} }
handleSignUpRequest() { handleSignUpRequest() {
@ -35,7 +36,7 @@ class AuthMenu extends Component {
} }
authMenu() { authMenu() {
if (!this.state.auth_menu_visible) { if (!this.props.auth_menu_visible) {
return null; return null;
} }
switch(this.state.where_in_auth_menu) { switch(this.state.where_in_auth_menu) {
@ -50,7 +51,7 @@ class AuthMenu extends Component {
<div className="fluid ui buttons"> <div className="fluid ui buttons">
<button onClick={this.handleSignUpRequest} className="ui button">Sign Up</button> <button onClick={this.handleSignUpRequest} className="ui button">Sign Up</button>
<div className="or"></div> <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>
</div> </div>
) )
@ -58,9 +59,9 @@ class AuthMenu extends Component {
return ( return (
<div className="ui menu dropdown" style={{display: "inline"}}> <div className="ui menu dropdown" style={{display: "inline"}}>
<div className="ui left icon input"> <div className="ui left icon input">
<input type="text" placeholder="Username"> <input type="text" placeholder="Password">
</input> </input>
<i className="users icon"></i> <i className="lock icon"></i>
</div> </div>
</div> </div>
) )