text: import React from 'react';
  import { Router, Switch } from 'react-router-dom';
  import createHistory from 'history/createBrowserHistory';
  import AddExpensePage from '../components/AddExpensePage';
  import EditExpensePage from '../components/EditExpensePage';
  import ExpenseDahsboardPage from '../components/ExpenseDahsboardPage';
  import HelpPage from '../components/HelpPage';
  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="/" component={LoginPage} exact={true} />
                  <PrivateRoute path="/dashboard" component={ExpenseDahsboardPage} />
                  <PrivateRoute path="/create" component={AddExpensePage} />
                  <PrivateRoute path="/edit/:id" component={EditExpensePage} />
                  <PublicRoute path="/help" component={HelpPage} />
                  <PublicRoute component={NotFoundPage} />
              </Switch>
          </div>
      </Router>
  );
  
  export default AppRouter;