Skip to content
Snippets Groups Projects
Select Git revision
  • d8fce8a2d4825fd2c866ad2501531a7d170fe8fe
  • master default protected
  • eole-amon-ecole-2.8
  • 24-badpathinpostinstall
4 results

stupidtable.min.js

  • GalleryView.js 835 B
    import { compose } from 'redux';
    import { connect } from 'react-redux';
    import * as actions from '../state/actions';
    import { withPlugins } from '../extend';
    import { GalleryView } from '../components/GalleryView';
    import { getManifestCanvases } from '../state/selectors';
    
    /**
     * mapStateToProps - to hook up connect
     * @memberof WindowViewer
     * @private
     */
    const mapStateToProps = (state, { window }) => (
      {
        canvases: getManifestCanvases(state, { windowId: window.id }),
      }
    );
    
    /**
     * mapDispatchToProps - used to hook up connect to action creators
     * @memberof WindowViewer
     * @private
     */
    const mapDispatchToProps = {
      setCanvas: actions.setCanvas,
    };
    
    const enhance = compose(
      connect(mapStateToProps, mapDispatchToProps),
      withPlugins('GalleryView'),
      // further HOC go here
    );
    
    export default enhance(GalleryView);