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