import React, { Suspense } from 'react'
import NavBar from './NavigationBar'
import Home from './Home'
import About from './About'
import Settings from './Settings'
import {BrowserRouter as Router, Switch, Route} from 'react-router-dom'

function App() {

  return (
    <>
      <NavBar/>
      <Router>
        <Suspense fallback={<div>Loading...</div>}>
          <Switch>
            <Route path="/" exact>
              <Home></Home>
            </Route>
            <Route path="/settings">
              <Settings></Settings>
            </Route>
            <Route path="/about" component={About}></Route>
          </Switch>
        </Suspense>
      </Router>
    </>
  )
}

export default App;
