-
Notifications
You must be signed in to change notification settings - Fork 6
/
index.js
34 lines (26 loc) · 1.09 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import React from "react";
import ReactDOM from "react-dom";
import MuiThemeProvider from "material-ui/styles/MuiThemeProvider";
import injectTapEventPlugin from "react-tap-event-plugin";
import App from "./App";
import Summary from "./components/summary/Summary";
import Menu from "./components/menus/SpicyMenu";
import AddMenu from "./components/menus/AddMenu";
import MenuDetail from "./components/menus/MenuDetail";
import {BrowserRouter as Router, browserHistory, Route, Redirect} from "react-router-dom";
injectTapEventPlugin();
const Root = () => (
<MuiThemeProvider>
<Router history={browserHistory}>
<div>
<Route path="/" component={App}/>
<Route path="/menu" component={Menu}/>
<Route path="/summary" component={Summary}/>
<Route path="/addMenu" component={AddMenu}/>
<Route path="/menuDetail/:id" component={MenuDetail}/>
<Redirect from="/" to="/menu"/>
</div>
</Router>
</MuiThemeProvider>
);
ReactDOM.render(<Root />, document.getElementById('root'));