import React from 'react';
import './App.css';
import Home from './Home'
import Quiz from './Quiz'
import End from './End'
import Admin from './Admin'

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

function App() {
  return (
    <Router>
      <header>
        <Link to="/">
          <button className="calcButton">Calculus</button>
        </Link>
      </header>
      <hr />
      <div>
        <Switch>
          <Route exact path="/" component={Home} />

          <Route path="/quiz" component={Quiz} />

          <Route path="/end" component={End} />

          <Route path="/admin" component={Admin} />

          <Redirect path="/admin" to="/admin" />
        </Switch>
      </div>
    </Router>
  )
}


export default App;