-
Notifications
You must be signed in to change notification settings - Fork 1
/
store.js
58 lines (54 loc) · 1.06 KB
/
store.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
49
50
51
52
53
54
55
56
57
58
import { createStore, applyMiddleware, compose } from 'redux';
import thunk from 'redux-thunk';
import rootReducer from './reducers';
const preloadedState = {
starRatingReducer: {
starObjArr: [
{
id: 0,
starType: 'star',
percentage: 12
},
{
id: 1,
starType: 'star-border',
percentage: 15
},
{
id: 2,
starType: 'star-border',
percentage: 20
},
{
id: 3,
starType: 'star-border',
percentage: 22
},
{
id: 4,
starType: 'star-border',
percentage: 25
}
],
percentage: 12
},
billTotalReducer: {
billTotal: 0.0
},
tippersSelectionReducer: {
arrowType: '',
numOfTippers: 1
},
calculationReducer: {
calculation: 0.0
}
};
const middleware = [thunk];
const store = createStore(
rootReducer,
preloadedState,
compose()
// applyMiddleware(...middleware),
// window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()
);
export default store;