-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathindex.js
More file actions
44 lines (35 loc) · 1.11 KB
/
Copy pathindex.js
File metadata and controls
44 lines (35 loc) · 1.11 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
40
41
42
43
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import registerServiceWorker from './registerServiceWorker';
import { Provider } from 'react-redux'
import { createStore, applyMiddleware, compose } from 'redux'
import persistState from 'redux-localstorage'
import logger from 'redux-logger'
import plannerApp from './reducers'
import { RESET_CHARACTER_CLASS, SET_RACE } from './actions'
// import { displayClassProgression } from './reducers'
// window.displayClassProgression = displayClassProgression
const middleware = false ?
applyMiddleware(logger) :
undefined
const enhancer = true ?
middleware ? compose(middleware, persistState()) : persistState() :
undefined
const store = createStore(plannerApp, enhancer)
const startup = false
if (startup) {
store.dispatch({
type: RESET_CHARACTER_CLASS,
class: 'barbarian'
})
store.dispatch({
type: SET_RACE,
race: 'human-variant'
})
}
ReactDOM.render(<Provider store={store}>
<App />
</Provider>, document.getElementById('root'));
registerServiceWorker();