Skip to content

Commit

Permalink
Redirected to login modal after signup (fossasia#3007)
Browse files Browse the repository at this point in the history
* Redirected to loginmodal after signup

* Redirected to login modal after signup
  • Loading branch information
plxity authored and akshatnitd committed Oct 30, 2019
1 parent d64b6ae commit de3e93d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/Auth/Login/Login.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class Login extends Component {
serverUrl: PropTypes.string,
captchaKey: PropTypes.string,
isCaptchaEnabled: PropTypes.bool,
message: PropTypes.string,
};

constructor(props) {
Expand Down Expand Up @@ -228,7 +229,7 @@ class Login extends Component {
attempts,
isCaptchaEnabled,
} = this.state;
const { actions, captchaKey } = this.props;
const { actions, captchaKey, message } = this.props;
const isValid =
email &&
!emailErrorMessage &&
Expand Down Expand Up @@ -283,6 +284,7 @@ class Login extends Component {
error={showCaptchaErrorMessage}
/>
)}
{message && <div style={{ color: '#388e3c' }}>{message}</div>}
<Button
onClick={this.handleSubmit}
variant="contained"
Expand Down
4 changes: 4 additions & 0 deletions src/components/Auth/SignUp/SignUp.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,10 @@ class SignUp extends Component {
success: true,
loading: false,
});
this.props.actions.openModal({
modalType: 'login',
message: payload.message,
});
} else {
this.setState({
password: '',
Expand Down

0 comments on commit de3e93d

Please sign in to comment.