From fa18b408cd27780a8eaaad2f74469fbd6e57acdb Mon Sep 17 00:00:00 2001 From: Daniel Ternyak Date: Mon, 24 Apr 2017 19:03:08 -0500 Subject: [PATCH] Remove authCheck dead code. --- common/components/Root/index.jsx | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/common/components/Root/index.jsx b/common/components/Root/index.jsx index 8ba17b36..73e0b4f8 100644 --- a/common/components/Root/index.jsx +++ b/common/components/Root/index.jsx @@ -10,24 +10,13 @@ export default class Root extends Component { routes: PropTypes.func }; - authCheck(nextState, replace, callback) { - let {store} = this.props - let {loggedIn} = store.getState().auth - let authPath = '/auth' - if (!loggedIn) { - replace(authPath) - } - - callback() - } - render() { const {store, history, routes} = this.props; // key={Math.random()} = hack for HMR from https://github.com/webpack/webpack-dev-server/issues/395 return ( - {routes(::this.authCheck)} + {routes()} );