diff options
Diffstat (limited to 'app/client/auth/auth.gate.js')
| -rw-r--r-- | app/client/auth/auth.gate.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/client/auth/auth.gate.js b/app/client/auth/auth.gate.js index 574feb3..2bbbc6d 100644 --- a/app/client/auth/auth.gate.js +++ b/app/client/auth/auth.gate.js @@ -43,18 +43,22 @@ class AuthRouter extends Component { class AuthGate extends Component { render(){ if (!this.props.auth.initialized) { + console.log('loading auth') return <div className='loading'>Loading</div> } if (this.props.auth.isAuthenticated) { + console.log('authenticated...') if (this.props.auth.returnTo) { let { returnTo } = this.props.auth if (!returnTo || returnTo.match(/(login|logout|signup)/i)) { returnTo = '/' } + console.log('history.push', returnTo) this.props.actions.setReturnTo(null) history.push(returnTo) return <div>Launching app</div> } + console.log('rendering as normal') return <div>{this.props.children}</div> } return <AuthRouter {...this.props} /> |
