Passed
Push — master ( 6fca9e...82ba0d )
by Huu-Phat
02:25 queued 10s
created

cms/src/post/containers/Content.js   A

Complexity

Total Complexity 1
Complexity/F 1

Size

Lines of Code 17
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 17
bpm 0
cpm 1
noi 0
c 0
b 0
f 0
rs 10
1
import { connect } from 'react-redux'
2
import { getEditedContent } from 'post/state/selectors'
3
import { editPostContent } from 'post/state/actions'
4
import Content from 'post/components/Content'
5
6
const mapStateToProps = state => {
7
  const editedContent = getEditedContent(state)
8
  return {
9
    content: editedContent || ''
10
  }
11
}
12
13
const mapDispatchToProps = {
14
  editPostContent
15
}
16
17
export default connect(mapStateToProps, mapDispatchToProps)(Content)
18