Skip to content

Commit

Permalink
Don't redirect on login/signup
Browse files Browse the repository at this point in the history
  • Loading branch information
ask-42 committed May 10, 2019
1 parent 54fba9e commit ab547d8
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions frontend/components/nav/modal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,21 @@ class Modal extends React.Component{
if(this.props.type.toLowerCase() === "login"){
this.props.login(this.state.user).then(()=>{
this.handleCloseModal();
this.props.history.push("/");
// this.props.history.push("/");
});
}else{
this.props.signup(this.state.user).then(()=>{
this.handleCloseModal();
this.props.history.push("/");
// this.props.history.push("/");
});
}
}
demoLogin(e){
e.preventDefault();
this.props.login({username: "demo_user", password: "demo1234"}).then(()=>{this.handleCloseModal(); this.props.history.push("/");});
this.props.login({username: "demo_user", password: "demo1234"}).then(()=>{
this.handleCloseModal();
//this.props.history.push("/");
});
}
togglePasswordVisibility(){
return (e)=>{
Expand Down

0 comments on commit ab547d8

Please sign in to comment.