-
Couldn't load subscription status.
- Fork 199
Closed
Description
I use [email protected]
reduxReactRouter({ getRoutes, createHistory }),
getRoutes(store) {
const {getState} = store;
return (
<Route path="/" component={ Application }>
<IndexRoute component={ Home } />
<Route onEnter={ requireLogin(getState) }>
<Route path="reports" component={ Reports } />
</Route>
</Route>
);
}
requireLogin(getState) {
return (nextState, replaceState) => {
const { auth: { user }} = getState();
if (!user) replaceState('/');
};
}When I open the url ..../reports I get an error "Cannot read property 'getState' of undefined".
Please tell me what went wrong?
Metadata
Metadata
Assignees
Labels
No labels