text: /* eslint-disable */
  import React, {useState} from 'react';
  import './App.css';
  import {
    BrowserRouter as Router,
    Switch,
    Route
  } from "react-router-dom";
  
  //Components
  import Header from './components/Header';
  import LoginForm from './components/LoginForm';
  import RegistrationForm from './components/RegistrationForm';
  import Home from './components/Home';
  //import PrivateRoute from './utils/PrivateRoute';
  import AlertComponent from './components/AlertComponent';
  
  import Chart from './components/chart';
  
  function App() {
    const [title, updateTitle] = useState(null);
    const [errorMessage, updateErrorMessage] = useState(null);
    return (
      <Router>
      <div className="App">
        <Header title={title}/>
          <div className="container d-flex align-items-center flex-column">
            <Switch>
              <Route path="/" exact={true}>
                <RegistrationForm showError={updateErrorMessage} updateTitle={updateTitle}/>
              </Route>
              <Route path="/register">
                <RegistrationForm showError={updateErrorMessage} updateTitle={updateTitle}/>
              </Route>
              <Route path="/login">
                <LoginForm showError={updateErrorMessage} updateTitle={updateTitle}/>
              </Route>
              <Route path="/home">
                <Home/>
                <Chart/>
              </Route>
            </Switch>
            <AlertComponent errorMessage={errorMessage} hideError={updateErrorMessage}/>
          </div>
      </div>
      </Router>
    );
  }
  
  export default App;
  