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.

21 lines (17 loc) 805 B
import { compose } from 'redux'; import { connect } from 'react-redux'; import { withPlugins } from '../extend/withPlugins'; import { ErrorContent } from '../components/ErrorContent'; import { getCompanionWindow, getManifest, getWindow, getViewer, getConfig } from '../state/selectors'; /** mapStateToProps */ const mapStateToProps = (state, { companionWindowId, windowId }) => ({ metadata: { companionWindow: companionWindowId && getCompanionWindow(state, { companionWindowId }), manifest: getManifest(state, { windowId }), viewer: getViewer(state, { windowId }), window: getWindow(state, { windowId }), }, showJsError: getConfig(state).window.showJsError, }); const enhance = compose(connect(mapStateToProps), withPlugins('ErrorContent')); export default enhance(ErrorContent);