1import React from "react";
2import { withRouter, Switch, Route } from "react-router";
3
4import AppBar from "@material-ui/core/AppBar";
5import CssBaseline from "@material-ui/core/CssBaseline";
6import Toolbar from "@material-ui/core/Toolbar";
7import Typography from "@material-ui/core/Typography";
8
9import Bug from "./Bug";
10
11const Home = () => <h1>Home</h1>;
12
13const App = ({ location }) => (
14 <React.Fragment>
15 <CssBaseline />
16 <AppBar position="static" color="primary">
17 <Toolbar>
18 <Typography variant="title" color="inherit">
19 git-bug-webui(1)
20 </Typography>
21 </Toolbar>
22 </AppBar>
23 <Switch>
24 <Route path="/" exact component={Home} />
25 <Route path="/bug/:id" exact component={Bug} />
26 </Switch>
27 </React.Fragment>
28);
29
30export default withRouter(App);