-
Notifications
You must be signed in to change notification settings - Fork 17
/
index.js
37 lines (32 loc) · 1.11 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
35
36
37
import React from "react";
import ReactDOM from "react-dom";
import "./index.css";
import registerServiceWorker from "./registerServiceWorker";
import MuiThemeProvider from "material-ui/styles/MuiThemeProvider";
import injectTapEventPlugin from "react-tap-event-plugin";
import {Redirect, Route, Router} from "react-router";
import getMuiTheme from "material-ui/styles/getMuiTheme";
import createBrowserHistory from "history/createBrowserHistory";
import Login from "./features/Login";
import Home from "./features/Home";
const muiTheme = getMuiTheme({
appBar: {
color: "#37517E",
height: 50
},
});
injectTapEventPlugin();
const customHistory = createBrowserHistory();
const Root = () => (
<MuiThemeProvider muiTheme={muiTheme}>
<Router history={customHistory}>
<div>
<Route path="/login" component={Login}/>
<Route path="/app/home" component={Home}/>
<Redirect from="/" to="/login"/>
</div>
</Router>
</MuiThemeProvider>
);
ReactDOM.render(<Root />, document.getElementById('root'));
registerServiceWorker();