diff --git a/client/homebrew/homebrew.jsx b/client/homebrew/homebrew.jsx index 19e8093..d15053e 100644 --- a/client/homebrew/homebrew.jsx +++ b/client/homebrew/homebrew.jsx @@ -35,11 +35,6 @@ const Homebrew = React.createClass({ }; }, componentWillMount: function() { - console.log('user', this.props.user); - console.log('loginpath', this.props.loginPath); - - //console.log(mapObject(['version', 'brew', 'account'], this.props)); - BrewActions.init({ version : this.props.version, brew : this.props.brew diff --git a/shared/homebrewery/account.actions.js b/shared/homebrewery/account.actions.js index 4905673..19b0326 100644 --- a/shared/homebrewery/account.actions.js +++ b/shared/homebrewery/account.actions.js @@ -5,9 +5,7 @@ const Actions = { Store.init(initState); }, login : ()=>{ - console.log('login'); - //redirect to the login path and add the redirect - + window.location = Store.getLoginPath(); }, logout : ()=>{ document.cookie = 'nc_session=;expires=Thu, 01 Jan 1970 00:00:01 GMT;path=/;domain=.naturalcrit.com'; diff --git a/shared/homebrewery/account.store.js b/shared/homebrewery/account.store.js index 3287e85..b79bd9f 100644 --- a/shared/homebrewery/account.store.js +++ b/shared/homebrewery/account.store.js @@ -17,6 +17,7 @@ Store.getLoginPath = ()=>{ let path = State.loginPath; if(typeof window !== 'undefined'){ console.log('yo here'); + path = `${path}?redirect=${encodeURIComponent(window.location.href)}`; } return path; };