Skip to content
Snippets Groups Projects
Commit 78edf348 authored by Anthony's avatar Anthony
Browse files

Load manifest on opening Accordion

parent 110f1474
No related branches found
No related tags found
1 merge request!16Resolve "Optimisation and wording for coheso"
Pipeline #1395 failed
......@@ -57,7 +57,7 @@ export class AnnotationManifestsAccordion extends Component {
handleOpenAccordion(e) {
const { annotation } = this.state;
/** */
async function loadManifest(manifests) {
async function load(manifests) {
return Promise.all(manifests.map((manifest) => fetch(manifest.id)
.then((response) => response.json())
.then((data) => {
......@@ -68,7 +68,7 @@ export class AnnotationManifestsAccordion extends Component {
})));
}
loadManifest(annotation.manifests)
load(annotation.manifests)
.then((values) => {
if (values) {
annotation.manifests = values;
......@@ -100,7 +100,6 @@ export class AnnotationManifestsAccordion extends Component {
onClick={(e) => this.handleOpenAccordion(e)}
>
<Typography className={classes.heading}>{t('manifestFound')}</Typography>
</AccordionSummary>
<AccordionDetails className={classes.manifestContainer}>
{annotation.manifests.map(manifest => (
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment