diff --git a/src/components/FlameLinkImage.js b/src/components/FlameLinkImage.js
index 07521cc..aede55f 100644
--- a/src/components/FlameLinkImage.js
+++ b/src/components/FlameLinkImage.js
@@ -1,4 +1,5 @@
import React, { Component } from 'react';
+import Typography from '@material-ui/core/Typography';
import flamelinkApp from '../flamelink.js';
@@ -9,21 +10,18 @@ class FlameLinkImage extends Component {
this.state = {
mediaURL: '',
}
- }
- getImage(imagePath){
- flamelinkApp.storage.getURL(imagePath)
+ flamelinkApp.storage.getURL(global.mediaID)
.then(url => this.setState({
mediaURL: url
}))
- return
- }
+ }
render() {
return(
-
- {this.getImage(this.props.content)}
-
+
+
+
);
}
}
diff --git a/src/components/FlameLinkStructure.js b/src/components/FlameLinkStructure.js
index e1aeb7f..470a592 100644
--- a/src/components/FlameLinkStructure.js
+++ b/src/components/FlameLinkStructure.js
@@ -17,6 +17,8 @@ const styles = theme => ({
class FlameLinkStructure extends Component {
constructor() {
super();
+
+ global.mediaID = '';
this.state = {
schemaContent: '',
@@ -89,7 +91,8 @@ class FlameLinkStructure extends Component {
}
if (type === 'media'){
for (var val in this.state.schemaContent[key]){
- return
+ global.mediaID = this.state.schemaContent[key][val];
+ return
}
}
if (type === 'fieldset'){