Skip to content
Snippets Groups Projects
Select Git revision
  • 81f3ad25545dfedaf1b126b5ad7de862762a42f1
  • main default
  • 35-cgu
  • 34-peertube-support
  • 27-add-autoplay-to-iframe
  • 33-bug-on-youtube-embed-urls
  • RC-Rekall-v1.1-fix_lpo
  • tuleap-140-go-back-to-my-capsules-page-when-i-m-on-capsule-preview-page
  • RC-Rekall-v1.2-fix10
  • RC-Rekall-v1.2-fix9
  • RC-Rekall-v1.2-fix8
  • RC-Rekall-v1.2-fix7
  • RC-Rekall-v1.2-fix6
  • RC-Rekall-v1.2-fix5
  • RC-Rekall-v1.2-fix4
  • RC-Rekall-v1.2-fix3
  • RC-Rekall-v1.2-fix2
  • RC-Rekall-v1.2-fix1
  • RC-Rekall-v1.1-fix-3
  • RC-Rekall-v1.1-fix-2
  • RC-Rekall-v1.1-fix-1
  • RC-Rekall-v1.1-delivered
  • preprod20220209-1535
23 results

symfony.lock

Blame
  • ViewerInfo.js 866 B
    import { compose } from 'redux';
    import { connect } from 'react-redux';
    import { withTranslation } from 'react-i18next';
    import { ViewerInfo } from '../components/ViewerInfo';
    import { getCanvasLabel, getWindowManifest, getManifestCanvases } from '../state/selectors';
    
    /**
     * mapStateToProps - to hook up connect
     * @memberof Window
     * @private
     */
    const mapStateToProps = (state, props) => {
      const { windowId } = props;
      const manifest = getWindowManifest(state, windowId);
      const canvases = getManifestCanvases(manifest);
      const { canvasIndex } = state.windows[windowId];
    
      return {
        canvasCount: canvases.length,
        canvasIndex,
        canvasLabel: getCanvasLabel(canvases[canvasIndex], canvasIndex),
      };
    };
    
    const enhance = compose(
      withTranslation(),
      connect(mapStateToProps, null),
      // further HOC go here
    );
    
    export default enhance(ViewerInfo);