Skip to content
Snippets Groups Projects
Commit 110f1474 authored by Anthony's avatar Anthony
Browse files

Load manifest on opening Accordion

parent b48b8467
No related branches found
No related tags found
1 merge request!16Resolve "Optimisation and wording for coheso"
......@@ -10,7 +10,6 @@ import {
} from '@material-ui/core';
import Button from '@material-ui/core/Button';
import Tooltip from '@material-ui/core/Tooltip';
import { removeDuplicates } from '../helper/utils';
/**
* AnnotationManifestsAccordion
......@@ -45,10 +44,18 @@ export class AnnotationManifestsAccordion extends Component {
this.state = { annotation };
}
/** */
componentDidMount() {
const { annotation } = this.state;
handleOpenManifestSideToSide(e, manifestId) {
const { addResource, addWindow } = this.props;
addResource(manifestId);
addWindow({ manifestId });
}
/** */
// eslint-disable-next-line class-methods-use-this,require-jsdoc
handleOpenAccordion(e) {
const { annotation } = this.state;
/** */
async function loadManifest(manifests) {
return Promise.all(manifests.map((manifest) => fetch(manifest.id)
......@@ -68,18 +75,6 @@ export class AnnotationManifestsAccordion extends Component {
this.setState({ annotation });
}
});
}
/** */
handleOpenManifestSideToSide(e, manifestId) {
const { addResource, addWindow } = this.props;
addResource(manifestId);
addWindow({ manifestId });
}
/** */
// eslint-disable-next-line class-methods-use-this,require-jsdoc
handleOpenAccordion(e) {
e.stopPropagation();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment