Skip to content
Snippets Groups Projects
Commit a0ae7f29 authored by Mathias Maaß's avatar Mathias Maaß
Browse files

Remove unused <ManifestMetadata/> component.

parent 73ff850f
No related branches found
No related tags found
No related merge requests found
import React from 'react';
import { shallow } from 'enzyme';
import createStore from '../../../src/state/createStore';
import * as actions from '../../../src/state/actions';
import ManifestMetadata from '../../../src/components/ManifestMetadata';
import fixture from '../../fixtures/version-2/002.json';
describe('ManifestMetadata', () => {
let wrapper;
let manifest;
const store = createStore();
beforeEach(() => {
store.dispatch(actions.receiveManifest('foo', fixture));
manifest = store.getState().manifests.foo;
wrapper = shallow(<ManifestMetadata manifest={manifest} />);
});
it('renders without an error', () => {
expect(wrapper.find('h3').text()).toBe('Test 2 Manifest: Metadata Pairs');
expect(wrapper.find('.mirador-description').length).toBe(1);
});
});
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import ns from '../config/css-ns';
/**
* ManifestMetadata
* @param {object} window
*/
export default class ManifestMetadata extends Component {
/**
* Renders things
* @param {object} props
*/
render() {
const { manifest } = this.props;
return (
<div>
<h3>
{manifest.manifestation.getLabel().map(label => label.value)[0]}
</h3>
<div className={ns('description')}>
{manifest.manifestation.getDescription().map(label => label.value)}
</div>
</div>
);
}
}
ManifestMetadata.propTypes = {
manifest: PropTypes.object, // eslint-disable-line react/forbid-prop-types
};
ManifestMetadata.defaultProps = {
manifest: null,
};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment