You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
541 B

  1. import { connect } from 'react-redux';
  2. import IntersectionObserverArticle from '../components/intersection_observer_article';
  3. import { setHeight } from '../actions/height_cache';
  4. const makeMapStateToProps = (state, props) => ({
  5. cachedHeight: state.getIn(['height_cache', props.saveHeightKey, props.id]),
  6. });
  7. const mapDispatchToProps = (dispatch) => ({
  8. onHeightChange (key, id, height) {
  9. dispatch(setHeight(key, id, height));
  10. },
  11. });
  12. export default connect(makeMapStateToProps, mapDispatchToProps)(IntersectionObserverArticle);