UNPKG

mirador

Version:

An open-source, web-based 'multi-up' viewer that supports zoom-pan-rotate functionality, ability to display/compare simple images, and images with annotations.

36 lines (30 loc) 925 B
import { compose } from 'redux'; import { connect } from 'react-redux'; import { withPlugins } from '../extend/withPlugins'; import { getManifestTitle, getWindow, } from '../state/selectors'; import * as actions from '../state/actions'; import { CollectionInfo } from '../components/CollectionInfo'; /** * mapStateToProps - to hook up connect * @memberof WindowSideBarInfoPanel * @private */ const mapStateToProps = (state, { windowId }) => { const { collectionPath } = (getWindow(state, { windowId }) || {}); const manifestId = collectionPath[collectionPath.length - 1]; return { collectionLabel: getManifestTitle(state, { manifestId }), collectionPath, }; }; const mapDispatchToProps = { showCollectionDialog: actions.showCollectionDialog, }; const enhance = compose( connect(mapStateToProps, mapDispatchToProps), withPlugins('CollectionInfo'), ); export default enhance(CollectionInfo);