import React, { Component } from 'react';

import './App.css';
import Zettel from './Zettel';
import NotFound from './NotFound'

import { BrowserRouter as Router, Route, Switch, Redirect, } from 'react-router-dom';

import Nav from './Nav';


export default class App extends Component {
  render(){
    return (

      <Router>             
         <Nav></Nav>
          <Switch>
                <Route path="/" exact render={() => {return  <Redirect to="/zettel" />;}} />
                <Route path="/zettel" component={Zettel} />
                <Route path="/hinzufügen" component={Zettel} />
                <Route path="/"  component={NotFound} />
          </Switch>
      </Router>

    );
  }

}



//                  <Route path="/" exact component={Zettel} />
//                  <Route path="/hinzufügen" exact component={Zettel} />
/*
alter return 
    return (
      <div>
        <h1>APP</h1>
        <Zettel />
      </div>

    );

*/ 