Skip to content

Commit

Permalink
fixed issue on sign up and login modal
Browse files Browse the repository at this point in the history
  • Loading branch information
realsoftdev committed Jul 19, 2017
1 parent 57402c7 commit 6a71acf
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 29 deletions.
1 change: 0 additions & 1 deletion client/modules/App/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ export class App extends Component {
<LoginModal />
<div className={styles.container}>
{this.props.children}

</div>
<Footer />
</div>
Expand Down
10 changes: 4 additions & 6 deletions client/modules/Auth/components/LoginModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,25 +26,23 @@ export class LoginModal extends Component {
show={ this.props.isShowModal }
aria-labelledby='contained-modal-title'>
<Modal.Header>
<Modal.title>Sign Up</Modal.title>
<Modal.Title>Sign Up</Modal.Title>
</Modal.Header>
<Modal.body>
<Modal.Body>
<div onBlur={this.hideModal}>
<input type='text' name='first_name' ref='first_name' />
<input type='text' name='last_name' ref='last_name' />
<input type='text' name='email' ref='email' />
<input type='password' name='password' ref='password' />
<a href='javascript:void(0);' onClick={this.login} >Sign Up</a>
</div>
</Modal.body>
</Modal>
</Modal.Body>
</Modal>
);
}
}

LoginModal.propTypes = {
hideModal: PropTypes.func.isRequired,
login: PropTypes.func.isRequired,
isShowModal: PropTypes.bool.isRequired,
};

Expand Down
41 changes: 19 additions & 22 deletions client/modules/Auth/components/SignupModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import Modal from 'react-bootstrap/lib/Modal'

import { connect } from 'react-redux';
import { hideSignupModal, signup } from '../AuthActions';
import { isShowSignupModal } from '../AuthReducer';

export class SignupModal extends Component {

Expand All @@ -24,35 +23,33 @@ export class SignupModal extends Component {
}));
};

render = () => {
render() {
return (
<Modal
show={ this.props.isShowModal }
aria-labelledby='contained-modal-title'>
<Modal.Header>
<Modal.title>Sign Up</Modal.title>
</Modal.Header>
<Modal.body>
<div onBlur={this.hideModal}>
<input type='text' name='first_name' ref='first_name' />
<input type='text' name='last_name' ref='last_name' />
<input type='text' name='email' ref='email' />
<input type='password' name='password' ref='password' />
<a href='javascript:void(0);' onClick={this.signup} >Sign Up</a>
</div>
</Modal.body>
</Modal>
<div>
<Modal
show={ this.props.isShowModal } onHide={this.hideModal}>
<Modal.Header>
<Modal.Title>Sign Up</Modal.Title>
</Modal.Header>
<Modal.Body>
<div onBlur={this.hideModal}>
<input type='text' name='first_name' ref='first_name' />
<input type='text' name='last_name' ref='last_name' />
<input type='text' name='email' ref='email' />
<input type='password' name='password' ref='password' />
<a href='javascript:void(0);' onClick={this.signup} >Sign Up</a>
</div>
</Modal.Body>
</Modal>
</div>
);
}
}

SignupModal.propTypes = {
isShowModal: PropTypes.bool.isRequired,
};

function mapStateToProps(state) {
return {
isShowModal: isShowSignupModal(state)
isShowModal: state.auth.isShowSignupModal
};
}

Expand Down
1 change: 1 addition & 0 deletions server/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ const renderFullPage = (html, initialState) => {
${process.env.NODE_ENV === 'production' ? `<link rel='stylesheet' href='${assetsManifest['/app.css']}' />` : ''}
<link href='https://fonts.googleapis.com/css?family=Lato:400,300,700' rel='stylesheet' type='text/css'/>
<link rel="shortcut icon" href="http://res.cloudinary.com/hashnode/image/upload/v1455629445/static_imgs/mern/mern-favicon-circle-fill.png" type="image/png" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/latest/css/bootstrap.min.css">
</head>
<body>
<div id="root">${html}</div>
Expand Down

0 comments on commit 6a71acf

Please sign in to comment.