diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-09-17 02:42:57 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-09-17 02:42:57 +0200 |
| commit | 021f46b9cf7c61efb8d2531694b0a724d6277c3f (patch) | |
| tree | 75018fba0c12c2de90e8651a617a3d4569c8184c /app/client/auth/signup.component.js | |
| parent | 4c18946614657a9f8955408e514172a74eacc28e (diff) | |
signup
Diffstat (limited to 'app/client/auth/signup.component.js')
| -rw-r--r-- | app/client/auth/signup.component.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/client/auth/signup.component.js b/app/client/auth/signup.component.js index 87e6ac6..4882681 100644 --- a/app/client/auth/signup.component.js +++ b/app/client/auth/signup.component.js @@ -39,7 +39,11 @@ class Signup extends Component { } render(){ if (this.props.auth.isAuthenticated) { - return <Redirect to={this.props.auth.returnTo || '/'} /> + let { returnTo } = this.props.auth + if (!returnTo || returnTo.match(/(api|login|logout|signup)/i)) { + returnTo = '/' + } + return <Redirect to={returnTo} /> } return ( <form onSubmit={this.handleSubmit}> |
