Skip to content
Snippets Groups Projects
Commit cb7f6108 authored by Jack Reed's avatar Jack Reed
Browse files

use container to select logo

parent 8dc112de
Branches
Tags
No related merge requests found
......@@ -7,7 +7,7 @@ import Typography from '@material-ui/core/Typography';
import ReactPlaceholder from 'react-placeholder';
import { TextBlock, TextRow, RectShape } from 'react-placeholder/lib/placeholders';
import ManifestListItemError from '../containers/ManifestListItemError';
import WindowIcon from './WindowIcon';
import WindowIcon from '../containers/WindowIcon';
import ns from '../config/css-ns';
import 'react-placeholder/lib/reactPlaceholder.css';
......@@ -41,7 +41,6 @@ export class ManifestListItem extends React.Component {
ready,
title,
thumbnail,
logo,
addWindow,
handleClose,
size,
......@@ -120,7 +119,7 @@ export class ManifestListItem extends React.Component {
</Grid>
<Grid item xs={4} sm={2}>
<WindowIcon className={ns('manifest-list-item-logo')} manifestLogo={logo} />
<WindowIcon className={ns('manifest-list-item-logo')} manifestId={manifestId} />
</Grid>
</Grid>
</ReactPlaceholder>
......@@ -136,7 +135,6 @@ ManifestListItem.propTypes = {
ready: PropTypes.bool,
title: PropTypes.string,
thumbnail: PropTypes.string,
logo: PropTypes.string,
size: PropTypes.number,
classes: PropTypes.object, // eslint-disable-line react/forbid-prop-types
provider: PropTypes.string,
......@@ -149,7 +147,6 @@ ManifestListItem.propTypes = {
ManifestListItem.defaultProps = {
handleClose: () => {},
ready: false,
logo: null,
thumbnail: null,
title: null,
classes: {},
......
......@@ -3,7 +3,7 @@ import { connect } from 'react-redux';
import { withNamespaces } from 'react-i18next';
import { withStyles } from '@material-ui/core';
import {
getManifestTitle, getManifestLogo, getManifestThumbnail, getManifestCanvases, getManifestProvider,
getManifestTitle, getManifestThumbnail, getManifestCanvases, getManifestProvider,
} from '../state/selectors';
import * as actions from '../state/actions';
import { ManifestListItem } from '../components/ManifestListItem';
......@@ -17,7 +17,6 @@ const mapStateToProps = (state, { manifestId }) => {
error: manifest.error,
isFetching: manifest.isFetching,
title: getManifestTitle(manifest),
logo: getManifestLogo(manifest),
thumbnail: getManifestThumbnail(manifest),
provider: getManifestProvider(manifest),
size: getManifestCanvases(manifest).length,
......
import { connect } from 'react-redux';
import { withStyles } from '@material-ui/core';
import { compose } from 'redux';
import { getWindowManifest, getManifestLogo } from '../state/selectors';
import { getManifestLogo } from '../state/selectors';
import WindowIcon from '../components/WindowIcon';
/** */
const mapStateToProps = (state, { windowId }) => ({
manifestLogo: getManifestLogo(getWindowManifest(state, windowId)),
const mapStateToProps = (state, { manifestId }) => ({
manifestLogo: getManifestLogo(state.manifests[manifestId]),
});
const styles = {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment