import React from 'react';
import logo from './logo.svg';
import './App.css';
import { HashRouter, Link, Switch, Route, Redirect } from 'react-router-dom';

import Participants from './Participants';
import Taches from './Taches';
import Actions from './Actions';

const Home = () => <h1> Accueil </h1>;

function App() {
  return (
    <HashRouter> 
		<nav>
			<ul>
				<li>
					<Link to="/"> Home </Link>
				</li>
				<li>
					<Link to="/participants"> participants </Link>
				</li>
				<li>
					<Link to="/taches"> taches </Link>
				</li>
        <li>
					<Link to="/actions"> actions </Link>
				</li>
			</ul>
		</nav>

		<Switch>
			<Route exact path="/">
				<Home />
			</Route>
			<Route path="/participants">
				<Participants />
			</Route>
			<Route path="/taches">
				<Taches />
			</Route>
      <Route path="/actions">
				<Actions />
			</Route>
			<Redirect to="/" />
		</Switch>
	</HashRouter>
  );
}

export default App;
