guesstimate/client/src/components/app.tsx

27 lines
743 B
TypeScript
Raw Normal View History

2020-07-09 13:00:42 +02:00
import React, { FunctionComponent } from "react";
import { BrowserRouter as Router, Route, Switch } from "react-router-dom";
2020-04-20 11:14:46 +02:00
2020-04-22 22:07:52 +02:00
import Home from "../routes/home/index";
import Project from "../routes/project/index";
2020-07-09 13:00:42 +02:00
import NotFound from '../routes/notfound/index';
2020-04-22 22:07:52 +02:00
import Header from "./header/index";
2020-05-09 17:34:29 +02:00
import Footer from "./footer";
2020-04-20 11:14:46 +02:00
2020-07-09 13:00:42 +02:00
const App: FunctionComponent = () => {
2020-04-20 11:14:46 +02:00
return (
2020-05-09 17:34:29 +02:00
<div id="app">
<Header class="noPrint" />
2020-07-09 13:00:42 +02:00
<Router>
<Switch>
<Route exact path="/" component={Home} />
<Route exact path="/p/:projectId" component={Project} />
<Route component={NotFound} />
</Switch>
2020-05-09 17:34:29 +02:00
</Router>
<Footer />
</div>
2020-04-20 11:14:46 +02:00
);
};
export default App;