| Total Complexity | 1 |
| Complexity/F | 1 |
| Lines of Code | 17 |
| Function Count | 1 |
| Duplicated Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 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 |