text: import React from 'react';
  import { Router, Route } from 'react-router-dom';
  import { connect } from 'react-redux';
  // import '/App.css'; 
  import './LoginPage/LoginPage.css'
  import { history } from './_helpers';
  import { alertActions } from './_actions';
  import { PrivateRoute } from './_components';
  import { HomePage } from './HomePage';
  import { LoginPage } from './LoginPage';
  import { RegisterPage } from './RegisterPage';
  import { NewProjectPage } from './NewProjectPage';
  import { ProjectPage } from './ProjectPage';
  import { TasksPage} from './TasksPage';
  
  class App extends React.Component {
      constructor(props) {
          super(props);
  
          const { dispatch } = this.props;
          history.listen((location, action) => {
              // clear alert on location change
              dispatch(alertActions.clear());
          });
      }
  
      render() {
          const { alert } = this.props;
          return (
              <div className="jumbotron jumboton_back">
                  <div className="container container_back">
                      <div className="col-sm-8 col-sm-offset-2">
                          {alert.message &&
                              <div className={`alert ${alert.type}`}>{alert.message}</div>
                          }
                          <Router history={history}>
                              <div>
                                  <PrivateRoute exact path="/" component={HomePage} />
                                  <Route path="/login" component={LoginPage} />
                                  <Route path="/register" component={RegisterPage} />
                                  <Route path="/projectMap" component={ProjectPage} />
                                  <Route path="/project" component={NewProjectPage} />
                                  <Route path="/newTask" component={TasksPage} />
                              </div>
                          </Router>
                      </div>
                  </div>
                  <div className="backimg"></div>
              </div>
              
          );
      }
  }
  
  function mapStateToProps(state) {
      const { alert } = state;
      return {
          alert
      };
  }
  
  const connectedApp = connect(mapStateToProps)(App);
  export { connectedApp as App }; 