@@ -4,7 +4,7 @@ import paginate from './paginate';
4
4
import { combineReducers } from 'redux' ;
5
5
6
6
// Updates an entity cache in response to any action with response.entities.
7
- export function entities ( state = { users : { } , repos : { } } , action ) {
7
+ function entities ( state = { users : { } , repos : { } } , action ) {
8
8
if ( action . response && action . response . entities ) {
9
9
return merge ( { } , state , action . response . entities ) ;
10
10
}
@@ -13,7 +13,7 @@ export function entities(state = { users: {}, repos: {} }, action) {
13
13
}
14
14
15
15
// Updates error message to notify about the failed fetches.
16
- export function errorMessage ( state = null , action ) {
16
+ function errorMessage ( state = null , action ) {
17
17
const { type, error } = action ;
18
18
19
19
if ( type === ActionTypes . RESET_ERROR_MESSAGE ) {
@@ -26,7 +26,7 @@ export function errorMessage(state = null, action) {
26
26
}
27
27
28
28
// Updates the pagination data for different actions.
29
- export const pagination = combineReducers ( {
29
+ const pagination = combineReducers ( {
30
30
starredByUser : paginate ( {
31
31
mapActionToKey : action => action . login ,
32
32
types : [
@@ -44,3 +44,11 @@ export const pagination = combineReducers({
44
44
]
45
45
} )
46
46
} ) ;
47
+
48
+ const rootReducer = combineReducers ( {
49
+ entities,
50
+ pagination,
51
+ errorMessage
52
+ } ) ;
53
+
54
+ export default rootReducer ;
0 commit comments