Passed
Push — master ( 9a73f0...7331d4 )
by Huu-Phat
01:50 queued 11s
created

cms/src/posts/containers/Pagination.js   A

Complexity

Total Complexity 1
Complexity/F 1

Size

Lines of Code 16
Function Count 1

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 11
mnd 0
bc 0
fnc 1
dl 0
loc 16
bpm 0
cpm 1
noi 0
c 0
b 0
f 0
rs 10
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