@@ -19,10 +19,10 @@ const mapStateToProps = state => ({
19
19
} ) ;
20
20
21
21
const mapDispatchToProps = dispatch => ( {
22
- onClickTag : ( tag , payload ) =>
23
- dispatch ( { type : APPLY_TAG_FILTER , tag, payload } ) ,
24
- onLoad : ( tab , payload ) =>
25
- dispatch ( { type : HOME_PAGE_LOADED , tab, payload } ) ,
22
+ onClickTag : ( tag , pager , payload ) =>
23
+ dispatch ( { type : ' APPLY_TAG_FILTER' , tag, pager , payload } ) ,
24
+ onLoad : ( tab , pager , payload ) =>
25
+ dispatch ( { type : ' HOME_PAGE_LOADED' , tab, pager , payload } ) ,
26
26
onUnload : ( ) =>
27
27
dispatch ( { type : HOME_PAGE_UNLOADED } )
28
28
} ) ;
@@ -31,10 +31,10 @@ class Home extends React.Component {
31
31
componentWillMount ( ) {
32
32
const tab = this . props . token ? 'feed' : 'all' ;
33
33
const articlesPromise = this . props . token ?
34
- agent . Articles . feed ( ) :
35
- agent . Articles . all ( ) ;
34
+ agent . Articles . feed :
35
+ agent . Articles . all ;
36
36
37
- this . props . onLoad ( tab , Promise . all ( [ agent . Tags . getAll ( ) , articlesPromise ] ) ) ;
37
+ this . props . onLoad ( tab , articlesPromise , Promise . all ( [ agent . Tags . getAll ( ) , articlesPromise ( ) ] ) ) ;
38
38
}
39
39
40
40
componentWillUnmount ( ) {
0 commit comments