text: /**
   * Created by Cooliean on 16/5/26.
   */
  import { connect } from 'react-redux'
  import { setVisibilityFilter } from '../actions'
  import Link from '../components/Link'
  
  const mapStateToProps = (state, ownProps) => {
      return {
          active: ownProps.filter === state.visibilityFilter
      }
  }
  
  const mapDispatchToProps = (dispatch, ownProps) => {
      return {
          onClick: () => {
              dispatch(setVisibilityFilter(ownProps.filter))
          }
      }
  }
  
  const FilterLink = connect(
      mapStateToProps,
      mapDispatchToProps
  )(Link)
  
  export default FilterLink