Skip to content
Snippets Groups Projects
Select Git revision
  • ba217b0fe42b55d8f9eb004c3d1e3b523a266010
  • main default protected
2 results

test_ontology_submodules.py

Blame
  • WindowTopBar.js 1010 B
    import { compose } from 'redux';
    import { connect } from 'react-redux';
    import { withNamespaces } from 'react-i18next';
    import * as actions from '../state/actions';
    import miradorWithPlugins from '../lib/miradorWithPlugins';
    import { getWindowManifest, getManifestTitle } from '../state/selectors';
    import WindowTopBar from '../components/WindowTopBar';
    
    /** mapStateToProps */
    const mapStateToProps = (state, { windowId }) => ({
      manifestTitle: getManifestTitle(getWindowManifest(state, windowId)),
    });
    
    /**
     * mapDispatchToProps - used to hook up connect to action creators
     * @memberof ManifestListItem
     * @private
     */
    const mapDispatchToProps = (dispatch, { windowId }) => ({
      removeWindow: () => dispatch(actions.removeWindow(windowId)),
      toggleWindowSideBar: () => dispatch(actions.toggleWindowSideBar(windowId)),
    });
    
    const enhance = compose(
      connect(mapStateToProps, mapDispatchToProps),
      miradorWithPlugins,
      withNamespaces(),
      // further HOC go here
    );
    
    export default enhance(WindowTopBar);