| Total Complexity | 1 |
| Complexity/F | 1 |
| Lines of Code | 16 |
| Function Count | 1 |
| Duplicated Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | import { connect } from 'react-redux' |
||
| 2 | import Pagination from 'posts/components/Posts/Pagination' |
||
| 3 | import { changePage, changeRowsPerPage } from 'posts/state/actions' |
||
| 4 | import { getPage, getRowsPerPage } from 'posts/state/selectors' |
||
| 5 | |||
| 6 | const mapStateToProps = state => ({ |
||
| 7 | page: getPage(state), |
||
| 8 | rowsPerPage: getRowsPerPage(state) |
||
| 9 | }) |
||
| 10 | |||
| 11 | const mapDispatchToProps = { |
||
| 12 | changePage, |
||
| 13 | changeRowsPerPage |
||
| 14 | } |
||
| 15 | |||
| 16 | export default connect(mapStateToProps, mapDispatchToProps)(Pagination) |
||
| 17 |