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