-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.js
More file actions
39 lines (36 loc) · 1.2 KB
/
index.js
File metadata and controls
39 lines (36 loc) · 1.2 KB
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
import React from "react";
import ReactDOM from "react-dom";
import thunk from "redux-thunk";
import registerServiceWorker from "./registerServiceWorker";
import { BrowserRouter as Router, Route } from "react-router-dom";
import "./index.css";
import "./containers/navigation.css";
import "./containers/style.css";
import App from "./App";
import TrailsContainer from "./containers/TrailsContainer";
import TrailRatingsContainer from "./containers/TrailRatingsContainer";
import rootReducer from "./reducers/rootReducer";
import Navigation from "./containers/Navigation";
import { Provider } from "react-redux";
import { createStore, applyMiddleware } from "redux";
const store = createStore(rootReducer, applyMiddleware(thunk));
ReactDOM.render(
<Provider store={store}>
<Router>
<div>
<Navigation />
<React.Fragment>
<Route exact path="/" component={App} />
<Route exact path="/trails" component={TrailsContainer} />
<Route
exact
path="/trail-ratings"
component={TrailRatingsContainer}
/>
</React.Fragment>
</div>
</Router>
</Provider>,
document.getElementById("root")
);
registerServiceWorker();