-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
29 lines (25 loc) · 985 Bytes
/
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
import React from 'react';
import ReactDOM from 'react-dom';
import { browserHistory, Route, Router, Redirect } from 'react-router';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import injectTapEventPlugin from 'react-tap-event-plugin';
import registerServiceWorker from './registerServiceWorker';
import Subject from './pages/Subject';
import Home from './pages/Home';
import Atendimento from './pages/Atendimento';
import File from './pages/File';
import './index.css';
injectTapEventPlugin();
const App = () => (
<MuiThemeProvider>
<Router history={browserHistory}>
<Route path="/" component={Home} />
<Route path="/materia/:subject" component={Subject} />
<Route path="/atendimento" component={Atendimento} />
<Route path="/materia/:subject/:id" component={File} />
<Redirect path="**" to="/" />
</Router>
</MuiThemeProvider>
)
ReactDOM.render(<App />, document.getElementById('root'));
registerServiceWorker();