blob: 524e6aa7c69da6556206da164b9a7c7f7a6e7c0e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
import { connect } from 'react-redux'
import { setContent } from '../actions'
import Link from '../components/UI/Link.jsx'
const mapStateToProps = (state, ownProps) => ({
selected: state.currentTask.content == ownProps.file
})
const mapDispatchToProps = (dispatch, ownProps) => ({
onClick: () => {
dispatch(setContent(ownProps.file))
}
})
const TaskContentLink = connect(
mapStateToProps,
mapDispatchToProps
)(Link)
export default TaskContentLink
|