import React, { FunctionComponent } from "react";
import { BrowserRouter as Router, Route, Switch } from "react-router-dom";

import Home from "../routes/home/index";
import Project from "../routes/project/index";
import NotFound from '../routes/notfound/index';
import Header from "./header/index";
import Footer from "./footer";

const App: FunctionComponent = () => {
    return (
      <div id="app">
        <Header class="noPrint" />
        <Router>
          <Switch>
            <Route exact path="/" component={Home} />
            <Route exact path="/p/:projectId" component={Project} />
            <Route component={NotFound} />
          </Switch>
        </Router>
        <Footer />
      </div>
    );
};

export default App;
