-
Notifications
You must be signed in to change notification settings - Fork 5
/
index.js
49 lines (45 loc) · 1.35 KB
/
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import { combineReducers } from 'redux';
import { createResponsiveStateReducer } from 'redux-responsive';
import { routerReducer } from 'react-router-redux';
import filterDate from './filter_by_date';
import filterArea from './filter_by_area_reducer';
import filterType from './filter_by_type_reducer';
import filterVehicle from './filter_by_vehicle_reducer';
import filterContributingFactor from './filter_contributing_factor_reducer';
import contributingFactors from './stats_contributing_factors_reducer';
import yearRange from './year_range_reducer';
import crashesDateRange from './crashes_date_range_reducer';
import crashesMaxDate from './crashes_max_date_reducer';
import crashStats from './crash_stats_reducer';
import modal from './modal_reducer';
// breakpoints for redux-responsive store
// taken from scss/skeleton/base/variables
const browser = createResponsiveStateReducer({
extraSmall: 400,
small: 550,
medium: 750,
large: 1000,
extraLarge: 1200
},
{
extraFields: () => ({
width: window.innerWidth,
height: window.innerHeight
})
});
const rootReducer = combineReducers({
browser,
contributingFactors,
crashesDateRange,
crashesMaxDate,
crashStats,
filterDate,
filterArea,
filterContributingFactor,
filterType,
filterVehicle,
modal,
routing: routerReducer,
yearRange,
});
export default rootReducer;