text: import React from 'react';
  import { Router,
      Route,
      Switch,
      Link,
      NavLink
  } from 'react-router-dom';
  import createHistory from 'history/createBrowserHistory';
  //
  import DashboardPage from '../components/ExpenseDashboardPage';
  import NotFoundPage from '../components/NotFoundPage';
  import LoginPage from '../components/LoginPage';
  import PrivateRoute from './PrivateRoute';
  import PublicRoute from './PublicRoute';
  
  export const history = createHistory();
  
  const AppRouter = () => (
      <Router history={history}>
          <div>
              <Switch>
                  <PublicRoute path="/" exact={true} component={LoginPage}/>
                  <PrivateRoute path='/dashboard' component={DashboardPage}/>
  
                  <Route component={NotFoundPage}/>
              </Switch>
          </div>
      </Router>
  );
  
  export default AppRouter;
  