logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe git clone https://hacktivis.me/git/mastofe.git

intersection_observer_article_container.js (541B)


  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);