| Total Complexity | 1 |
| Complexity/F | 1 |
| Lines of Code | 24 |
| Function Count | 1 |
| Duplicated Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | import { connect } from 'react-redux' |
||
| 2 | import { withRouter } from 'react-router' |
||
| 3 | import Body from 'posts/components/Posts/Body' |
||
| 4 | import { setSelectedPost } from 'posts/state/actions' |
||
| 5 | import { |
||
| 6 | getPage, |
||
| 7 | getRowsPerPage, |
||
| 8 | getOrder, |
||
| 9 | getOrderColumn |
||
| 10 | } from 'posts/state/selectors' |
||
| 11 | |||
| 12 | const mapStateToProps = state => ({ |
||
| 13 | page: getPage(state), |
||
| 14 | rowsPerPage: getRowsPerPage(state), |
||
| 15 | order: getOrder(state), |
||
| 16 | orderColumn: getOrderColumn(state) |
||
| 17 | }) |
||
| 18 | |||
| 19 | const mapDispatchToProps = { |
||
| 20 | setSelectedPost |
||
| 21 | } |
||
| 22 | |||
| 23 | const BodyWithRouter = withRouter(Body) |
||
| 24 | export default connect(mapStateToProps, mapDispatchToProps)(BodyWithRouter) |
||
| 25 |