import React from 'react'; import {Route, IndexRoute} from 'react-router'; import {routerActions} from 'react-router-redux'; import {UserAuthWrapper} from 'redux-auth-wrapper'; import App from './components/App'; import HomePage from './components/HomePage'; import LoginPage from './containers/LoginPage'; import LogoutPage from './containers/LogoutPage'; import ProfilePage from './containers/ProfilePage'; import AboutPage from './components/AboutPage.js'; import NotFoundPage from './components/NotFoundPage.js'; // Redirects to /login by default const UserIsAuthenticated = UserAuthWrapper({ authSelector: state => state.auth, // how to get the user state predicate: (auth) => auth.isAuthenticated, // function to run against the auth state to determine if authenticated redirectAction: routerActions.replace, // the redux action to dispatch for redirect wrapperDisplayName: 'UserIsAuthenticated' // a nice name for this auth check }); export default ( );