-
Notifications
You must be signed in to change notification settings - Fork 1
/
app.js
48 lines (37 loc) · 1.15 KB
/
app.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
38
39
40
41
42
43
44
45
46
47
48
import React from 'react';
const ReactDOM = require('react-dom');
var { Provider } = require('react-redux');
import {
BrowserRouter as Router,
Route,
Link,
Switch,
Redirect
} from 'react-router-dom';
var store = require('configureStore').config();
import Login from './components/Login.js';
import Register from './components/Register.js';
import Chats from './components/Chats.js';
import AuthRoute from './components/AuthRoute.js'
// require('style-loader!css-loader!../public/styles/bundle.css');
// require('script-loader!../public/js/vendor/jquery.js');
// require('script-loader!../public/js/vendor/foundation.min.js');
// require('script-loader!../public/js/app.js');
const routes = (
<Router>
<div>
<Route exact path="/" component={Login} />
<Route path="/login" component={Login} />
<Route path="/register" component={Register} />
<Switch>
<AuthRoute path="/chat" component={Chats} />
</Switch>
</div>
</Router>
);
ReactDOM.render(
<Provider store={store}>
{routes}
</Provider>,
document.getElementById('app')
);