From 0a221464241ccda47e0dd52ba309ccf9dead0f96 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 17 Sep 2018 03:28:59 +0200 Subject: build --- app/client/auth/auth.gate.js | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) (limited to 'app/client/auth') diff --git a/app/client/auth/auth.gate.js b/app/client/auth/auth.gate.js index 07ab399..087dfc6 100644 --- a/app/client/auth/auth.gate.js +++ b/app/client/auth/auth.gate.js @@ -14,15 +14,21 @@ import { randint } from '../util/math' class AuthRouter extends Component { render(){ - console.log(this.props, Login) return (
- - - + + + + + { + this.props.actions.setReturnTo(props.location.pathname) + return ( + + ) + }} />
@@ -35,12 +41,11 @@ class AuthRouter extends Component { class AuthGate extends Component { render(){ - console.log(this.props.auth) if (!this.props.auth.initialized) { return
Loading
} if (this.props.auth.isAuthenticated) return
{this.props.children}
- return + return } componentDidMount(){ this.props.actions.checkin() @@ -56,11 +61,3 @@ const mapDispatchToProps = (dispatch) => ({ }); export default connect(mapStateToProps, mapDispatchToProps)(AuthGate); - - // { - // console.log(window.location.pathname) - // this.props.actions.setReturnTo(window.location.pathname) - // return ( - // - // ) - // }} /> \ No newline at end of file -- cgit v1.2.3-70-g09d2