Skip to content
Snippets Groups Projects
Select Git revision
  • 860023ed43d1710a1defd9bedfc5b5d2ed602dc1
  • master default protected
  • multiprocessing
  • experiment/clara
  • experiment/spec2B-poc
  • experiment/qivalio-poc
  • experiment/ertms
  • MAY-2023
  • FEB-2023
  • EGC-2023
  • 0.2.1
  • v0.2.0
  • v0.1.2
13 results

run_extraction_prod.py

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